Reproduction
- Install and enable
vscode-neovim.
- Open an oil buffer.
- Open preview for the selected entry.
- Enter a directory from the oil buffer.
- Press
j using vscode-neovim to move down one row.
Actual behavior
The cursor jumps/snaps back to the first row instead of staying on the newly selected row.
Expected behavior
The cursor should move down one row normally.
Scope / current findings
- Reproduces with
vscode-neovim.
- Does not reproduce with arrow keys.
- Does not reproduce with VSCodeVim.
- This appears to be pre-existing rather than caused by the recent
previewByDefault work.
- The issue is specifically tied to oil buffers with preview enabled after directory navigation.
Notes from investigation
- We removed a delayed cursor reset in
src/commands/select.ts on the "enter directory" path because it could race with real user movement.
- We also fixed
src/decorations.ts so hidden-prefix correction no longer forces the cursor to line 0.
- After those fixes, the general extension tests pass and normal VS Code / VSCodeVim movement behave correctly.
- The remaining bad behavior looks specific to the timing/order of selection updates coming from
vscode-neovim.
Likely areas to revisit
src/decorations.ts
- hidden prefix correction in
onDidChangeTextEditorSelection
- any cursor mutation during decoration updates
src/commands/select.ts
- post-navigation cursor placement when entering directories
- possible interaction with
vscode-neovim cursor synchronization timing
Environment observed during investigation
- branch:
feat/file-preview-by-default
- commit:
db4330e3c08da76d909368690134ea03b81df17a
- oil.code workspace tests were passing at the time of filing
Follow-up
When revisiting this, it would be useful to capture the exact sequence of VS Code selection events vs vscode-neovim cursor updates while moving from row 0 to row 1 in a freshly opened oil directory buffer with preview enabled.
Reproduction
vscode-neovim.jusingvscode-neovimto move down one row.Actual behavior
The cursor jumps/snaps back to the first row instead of staying on the newly selected row.
Expected behavior
The cursor should move down one row normally.
Scope / current findings
vscode-neovim.previewByDefaultwork.Notes from investigation
src/commands/select.tson the "enter directory" path because it could race with real user movement.src/decorations.tsso hidden-prefix correction no longer forces the cursor to line0.vscode-neovim.Likely areas to revisit
src/decorations.tsonDidChangeTextEditorSelectionsrc/commands/select.tsvscode-neovimcursor synchronization timingEnvironment observed during investigation
feat/file-preview-by-defaultdb4330e3c08da76d909368690134ea03b81df17aFollow-up
When revisiting this, it would be useful to capture the exact sequence of VS Code selection events vs
vscode-neovimcursor updates while moving from row 0 to row 1 in a freshly opened oil directory buffer with preview enabled.