VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
14.02k stars 1.32k forks source link

Jumping to mark does not work after `O` #6838

Open carljohnson93 opened 3 years ago

carljohnson93 commented 3 years ago

Describe the bug I wanted to recreate some of the vim-unimpaired mappings, in particular, ]<Space and [<Space>. I quickly came up with both base mapping, and then an idea for cursor position restoration via marks, here's what I've added to vim.normalModeKeyBindingsNonRecursive for ]<Space:

{
    "before": ["]", "<Space>"],
    "after": ["m", "`", "o", "<Esc>", "`", "`"],
}

Works perfectly fine

and for [<Space>:

 {
    "before": ["[", "<Space>"],
    "after": ["m", "`", "O", "<Esc>", "`", "`"],
 }

This mapping, however, despite the difference in only o casing, does not work as expected. It does not jump to the set mark. It's also probably worth noting that using "k", "o" instead of "O" does not help.

To Reproduce Paste two of the mappings from above to the vim.normalModeKeyBindingsNonRecursive setting in settings.json.

Expected behavior Everything is described above.

Environment:

carljohnson93 commented 3 years ago

Wow, now in 1.21.5 version of the extension I've noticed that the bug is no longer there. Thank you for this amazing extension and your amazing work!

carljohnson93 commented 3 years ago

Whoops, turns out that it's not version that fixed this bug, it's just that I was on windows when noticed that the bug isn't there. On macOs it still there.

jmederosalvarado commented 1 year ago

I'm also experiencing this issue