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
fix(scrolling): fix c-u/c-y/c-f/c-b by deletion #885
Conversation
I found an explanation for why neovim was not originally handling the scrolling. #361
I don't notice any jitter - maybe its safe to use this now? Edit: Maybe I'm wrong, this won't actually fix c-e and c-y. |
This actually incorporates what I showed in #580, forgot about that. I'll update with H/M/L. This has the same problem though, as it is affected with |
I'm missing context here, but I wonder if this hack was done before |
I'm also quite lacking in knowledge, but this seems related to #868 (comment) . I think the solution to one would be a solution to the other (as well as the solution to many other issues regarding viewport). |
If it's possible to remove the hacks while making some small tradeoffs (e.g. |
Yeah, I'd say all that we need to merge this is for the |
fix scrolling commands by removing custom code and reverting to default nvim behavior
This reverts commit 29233d5.
I'm having trouble following. Can you bring us up to date what the status of this PR is? |
Sorry. Here is what happened:
So, the current state is "waiting for #993, currently reverted". |
Problem
Window scroll commands don't move the cursor and instead just scroll the window. This differs from nvim behavior. This is because the extension intercepts the keybindings and applies vscode commands instead. The solution from #528 and #855 simply improves the logic in the plugin to move the cursor. However, this adds complexity and increases the separation from nvim.
Solution
Remove all custom code for cursor scrolling and allow nvim to handle it itself. However, I have found two problems:
scrolloff=100
, the scrolling commands behave strangely, and don't reach the top of the screen. c-d scrolls twice as far as it should. However, this can't be avoided according tovscode-neovim/src/main_controller.ts
Line 55 in 52ff626
vscode-neovim/vim/vscode-options.vim
Line 16 in d11c2ed
Fixes #293, #580, #528, and #855.