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] ci', cursor jumps to the end of line #1752

Closed
wenfangdu opened this issue Jan 17, 2024 · 21 comments · Fixed by #2035
Closed

[Bug] ci', cursor jumps to the end of line #1752

wenfangdu opened this issue Jan 17, 2024 · 21 comments · Fixed by #2035
Labels
question usage, configuration, how-to

Comments

@wenfangdu
Copy link
Contributor

OS: macOS 14
nvim: 0.9.5
vscode-nvim: 1.5.0

vscode-neovim behavior (cursor jumps to the end of the line):

iShot_2024-01-17_14.39.46.mp4

Neovim behavior (cursor stays inside the quotes):

iShot_2024-01-17_14.47.18.mp4

Code:

$base = '../rewards'
$bgi = $proxy($base, 'bgi')

@import '../includes/highlight.styl'

.open-task-btn
  $bgi '../static/rewards/open-tasks-btn-double.png'
  $highlight '../static/rewards/open-tasks-btn-double.png'
@xiyaowong
Copy link
Collaborator

#1080 Still can't reproduce

@wenfangdu
Copy link
Contributor Author

@xiyaowong I tried disabling all extensions except vscode-neovim, but the issue still persists.

@wenfangdu
Copy link
Contributor Author

wenfangdu commented Jan 22, 2024

@xiyaowong Can you share your environment info, e.g. OS, vscode version, vscode-neovim version, neovim version, etc?

@xiyaowong
Copy link
Collaborator

OS: windows 11
All are the latest versions

@wenfangdu
Copy link
Contributor Author

wenfangdu commented Jan 22, 2024

@xiyaowong Can you try this on a Mac? I don't have a Windows machine at hand right now.

@KeqiZeng
Copy link

Facing same issue on MacOS 14.2.1

@wenfangdu
Copy link
Contributor Author

@xiyaowong Confirmed, both #1752 and #1080 are not reproducible on Windows 11 but reproducible on macOS 14, all other related apps are the latest.

@ollien
Copy link
Collaborator

ollien commented Apr 13, 2024

FWIW, I've tried to replicate this on Linux, and could not. I guess it's macOS specific?

@wenfangdu
Copy link
Contributor Author

@ollien Thanks for the experiment, looks like it is.

@xiyaowong
Copy link
Collaborator

Please confirm if the issue still exists

@wenfangdu
Copy link
Contributor Author

@xiyaowong Still exists.

@wenfangdu
Copy link
Contributor Author

@xiyaowong I just upgraded vscode-nvim to 1.14.1, and it's still reproducible with ci', please reopen this issue:

iShot_2024-05-31_12.39.01.mp4

@xiyaowong
Copy link
Collaborator

Could you provide more logs and a complete screen recording? When does the issue occur, and when does it function normally? A single screen recording like this is not helpful at all.

@xiyaowong xiyaowong removed the help wanted PRs are welcome label May 31, 2024
@wenfangdu
Copy link
Contributor Author

@xiyaowong I tried, but there's no log, full repro that contains cases that work and don't work:

iShot_2024-06-01_11.51.26.mp4

Could it be a race condition? As you can see in the recording, the cursor jumps to the end of line, then jumps back (work), sometimes it doesn't jump back or might jumped back first and then jumped to the end of line (don't work).

Play this clip in x0.5 speed, you'll see:

clip.mp4

Please reopen this.

@xiyaowong
Copy link
Collaborator

xiyaowong commented Jun 1, 2024

Could it be a race condition? As you can see in the recording, the cursor jumps to the end of line, then jumps back (work)

Expected


I don't understand why only your environment has this issue. I will open this issue when I encounter the problem or when other users report it.

@wenfangdu
Copy link
Contributor Author

@xiyaowong Could it because the cursor jumped back first and then jumped to the end of line?

image

This dev has it too, so not an exception.

Also, check the full message, I've updated it multiple times.

@wenfangdu
Copy link
Contributor Author

Could it be a race condition? As you can see in the recording, the cursor jumps to the end of line, then jumps back (work)

Expected

@xiyaowong Where's the code controls that? I can add logs there.

@xiyaowong
Copy link
Collaborator

Try changing option: vscode-neovim.normalSelectionDebounceTime

@wenfangdu
Copy link
Contributor Author

@xiyaowong Yeah, setting "vscode-neovim.normalSelectionDebounceTime": 100 seems to have fixed it, the default is 50, I thought it would be caused by something like this, race condition indeed. 🎉🎉🎉

@wenfangdu
Copy link
Contributor Author

Side note: slower computers might be less likely to have this issue, my old Windows laptop doesn't have it, but the m1 mac has it.

@xiyaowong
Copy link
Collaborator

Not accurate. There are many vscode-neovim users, but currently only two have reported this issue.

After so long, from the test, it is indeed unstable on macOS, and the test often fails for no reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question usage, configuration, how-to
Projects
None yet
5 participants