godbout / kindaVim.docs

Ultimate Vim Mode for macOS
https://kindavim.app
614 stars 4 forks source link

Bugfix: Motions not working on Notes #207

Open jstriblet opened 8 months ago

jstriblet commented 8 months ago

Weird motion behavior in notes app, attaching video but here is what I'm seeing:

1) In normal mode, j/k navigation randomly skips lines as seen when skipping the "Last todo" line in the video 2) Continuing to press j when on the last line cycles between the second to last and last line 3) When I press "k" in normal mode it brings me to the top of the note

Im not sure if this is because I'm using the check list feature notes but here are my OS specs if it matters: Processor: 2.4 GHz 8-Core Intel Core i9 MacOS: 14.1.1 (23B81)

https://github.com/godbout/kindaVim.docs/assets/12757245/46c6853b-19da-451f-9d00-44c4b4e1e723

godbout commented 8 months ago

i can reproduce yeah. i'm afraid Notes is (now?) a Catalyst app? there's some funky stuff happening. like if you remove the last empty line of your document, then it's added automatically again. might fuck up the characters count etc. i'll need to dig deeper and probably report the issue to Apple. will keep you updated.

godbout commented 8 months ago

if it's super annoying (which i believe it is) you could move Notes to the Key Mapping Family. for some motions it's gonna work "better", but a lot will be missing also. not the best, but it depends on what kinda moves you're gonna use yourself.

godbout commented 8 months ago

Notes used to work out of the box. i think Apple may have added some features in Sonoma, and not care much about the Accessibility unfortunately. so yeah, i need to investigate deeply first, and report to them after most probably.

godbout commented 8 months ago

@jstriblet yeah so i dug into this, and basically once you start using some funky stuff in Notes like lists, todos etc. the AX gets fucked. i'm going to report this to Apple. not sure when Apple added those features? but most probably it's coming from iOS. Notes could be a Catalyst app now (although not sure) and they didn't care about the AX anymore. sad. will be less funky if you put Notes in the Key Mapping Family, but then the motions will be done through key remapping, which is less good but will feel less random :(

godbout commented 8 months ago

reported: https://github.com/feedback-assistant/reports/issues/445

that's one of the issue. there's more. fixing this one will not solve the whole problem. i will investigate more and will report the other issues to Apple.

godbout commented 8 months ago

tedious investigation but yes, the todo and the list glyphs are not respected in the text received from the AX Framework. but the line ranges received INCLUDE those glyphs. so it fucks up the calculations. will be reported to Apple.

godbout commented 7 months ago

reported to Apple as FB13431888 (https://github.com/feedback-assistant/reports/issues/447)

i'll update the description in The Wizard and make a release.

jstriblet commented 7 months ago

I appreciate you looking into this! Thank you.

godbout commented 7 months ago

sure. makes kV better. or at least more "truthful" and closer to the unfortunately reality. thanks for the report coz i hadn't catch that myself.

godbout commented 7 months ago

The Wizard has been updated for Notes in kV60: https://github.com/godbout/kindaVim.docs/releases/tag/60

itaysk commented 6 months ago

Encountered similar behavior in Notes, instead of opening a new issue, I'll add my recording here:

  1. pressing j for next line will not go past a list
  2. when reaching the bottom of the note, pressing k for previous line jumps to the top of the note.

https://github.com/godbout/kindaVim.docs/assets/1161307/3ffd0440-c3a6-4be3-82eb-b4e5e86c3877

godbout commented 6 months ago

Encountered similar behavior in Notes, instead of opening a new issue, I'll add my recording here:

  1. pressing j for next line will not go past a list
  2. when reaching the bottom of the note, pressing k for previous line jumps to the top of the note.

    Screen.Recording.2024-01-01.at.15.06.54.mov

unfortunately yes. as stated above, Apple doesn't respect their own Accessibility in Notes when you start using funky markdown stuff. this has been reported to Apple (see FB above), and The Wizard has been updated to reflect this:

Screenshot 2024-01-02 at 14 17 23

so the best is if you use checklists etc., add Notes to the Key Mapping Family. there'll be less moves available and less "perfect", but the overall feel with kV should be more predictable/comfortable.