dstein64 / nvim-scrollview

A Neovim plugin that displays interactive vertical scrollbars and signs.
MIT License
517 stars 9 forks source link

Mouse wheel scrolling and <ctrl-e> scrolling can get stuck when scrollview_base=buffer and there are wrapped lines #103

Closed dstein64 closed 12 months ago

dstein64 commented 12 months ago

Mouse wheel scrolling and <ctrl-e> scrolling can get stuck when scrollview_base is set to 'buffer' and there are wrapped lines.

To reproduce:

Download Alice’s Adventures in Wonderland from https://www.gutenberg.org/files/11/11-0.txt.

Convert the hard-wrapped lines to be long lines:

:%normal! vipJ

Set scrollview_base to 'buffer' and go to the top of the file.

:let g:scrollview_base = 'buffer'
:normal! gg

Hold <ctrl-e> or scroll down using the mouse wheel. Scrolling will get stuck. This is from buf_text_begins_col and buf_view_begins_col temporarily turning off wrap. The issue can be resolved by using a window workspace for those functions.

https://github.com/dstein64/nvim-scrollview/assets/541289/e43c6a41-e314-4921-b32a-0b3aa16a7177

dstein64 commented 12 months ago

Fixed in 024e56ea040622eac857e3ab4325c5f13de4c6f2.