nvim-scrollbar
nvim-scrollbar copied to clipboard
Works incorrectly when a line is too long and is split into multiple lines
Describe the bug
When a line is too long and is split into multiple lines, the scrollbar behaves incorrectly.
To Reproduce
- Fill the screen with long lines that don't fit into a single line.
- The scrollbar appears only when there are enough text lines, instead of enough visual lines.
- The scrollbar character only appears at the first visual line of each text line and seems broken. Some lines even don't have the scrollbar character.
Expected behavior
- The scrollbar appears when the screen is full, instead of when there are enough text lines.
- The scrollbar appearance should be continuous.
Screenshots
Version Info (please complete the following information):
-
nvim --version
NVIM v0.7.0-dev+1132-g15004473b5
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-git/src/build/config -I/build/neovim-git/src/neovim-git/src -I/usr/include -I/build/neovim-git/src/build/src/nvim/auto -I/build/neovim-git/src/build/include
Compiled by builduser
Features: +acl +iconv +tui
Yep, this is a bug when vim.opt.wrap = true
.
I'm unsure of a fix for this at the moment. I believe this can fix it but I haven't had a chance to look at it yet.
Yep, this is a bug when
vim.opt.wrap = true
.I'm unsure of a fix for this at the moment. I believe this can fix it but I haven't had a chance to look at it yet.
This is also occour when i set wrap to false
Maybe something can be gleaned from how nvim-scrollview accomplishes this?
Yep, this is a bug when
vim.opt.wrap = true
. I'm unsure of a fix for this at the moment. I believe this can fix it but I haven't had a chance to look at it yet.This is also occour when i set wrap to false
I got the same case with nowrap
. And I found set the argument col=0
to the function nvim_buf_set_extmark
of https://github.com/petertriho/nvim-scrollbar/blob/main/lua/scrollbar/init.lua#L161 and https://github.com/petertriho/nvim-scrollbar/blob/main/lua/scrollbar/init.lua#L177 can resolve this case. (But still not works for wrap
. And not works with multi-bytes character where scrollbar mark is going to place)
Still break scrollbar for line with wrap. Would be nice to fix it. Thanks for the great plugin btw!