Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with using bookmarks extension #7288

Open
evolify opened this issue Nov 29, 2021 · 3 comments
Open

Bug with using bookmarks extension #7288

evolify opened this issue Nov 29, 2021 · 3 comments

Comments

@evolify
Copy link

evolify commented Nov 29, 2021

Describe the bug
cursor does not stay at bookmarked location after coming back

To Reproduce
Steps to reproduce the behavior:

  1. go to a position, say line 4, Col 20
  2. create a bookmark with "bookmarks: toggle". The little sign appears
  3. move to another position, anywhere. Say line 10, Col 2
  4. trigger "bookmarks: jump to next". The cursor SEEMS to be coming back to the right position (line 4, Col 20)
    I use vscode in VIM mode, with the popular vim extension. Now that my cursor is back at my bookmarked location, I want to move one character to the right, be pressing l. Instead of the cursor moving to line 4, Col 21, it first jumps back to wherever I was when I triggered the "bookmarks: jump to next" command (line 10, Col 2 in this example). It does my right movement, but not on the right line. I end up at line 10, Col 3

Additional context
alefragnani/vscode-bookmarks#338

@ZhengXB210
Copy link

this bug still there...any workarround for this?

@schreifels
Copy link

Rebinding hjkl to the native VSCode navigation commands worked around the issue for me, but other VSCodeVim commands that rely on knowing the cursor position are still broken. For example, if you navigate to a bookmark and then use zz to vertically center that line in the viewport, it will center the wrong line.

  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["h"],
      "commands": ["cursorLeft"]
    },
    {
      "before": ["j"],
      "commands": ["cursorDown"]
    },
    {
      "before": ["k"],
      "commands": ["cursorUp"]
    },
    {
      "before": ["l"],
      "commands": ["cursorRight"]
    }
  ]

@zeroxia
Copy link

zeroxia commented May 20, 2024

VS Code version:

Version: 1.89.1 (user setup)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.19045

Vim extension: v1.27.2

Bookmarks extension: v13.5.0

If using Bookmarks command to jump to a bookmark location, then press VIM cursor navigation, like 'h', 'j', 'k', 'l', the cursor position from VIM extension is still the one before jumping to the bookmark location.

I see the issue was raised in year 2021. Is there any update? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants