sslivkoff / vim-scroll-barnacle

a scrollbar for vim in the terminal
Apache License 2.0
14 stars 0 forks source link

Scrollbar appears to have a "gap" in it that changes appearance with movement #3

Open khughitt opened 4 years ago

khughitt commented 4 years ago

The scrollbar appears "split", with a small gap in it that changed in size and position as I scroll through a document, e.g.:

vim-scroll-barnacle-issue-3_2020-03-05 14-13

Incidentally, the above video also demonstrates the mousewheel issue reported in issue #1 .

System info:

Neovim version:

NVIM v0.5.0-296-gfa9b057d3
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/keith/.cache/yay/neovim-git/src/neovim-git/build/config -I/home/keith/.cache/yay/neovim-git/src/neovim-git/src -I/usr/include -I/home/keith/.cache/yay/neovim-git/src/neovim-git/build/src/nvim/auto -I/home/keith/.cache/yay/neovim-git/src/neovim-git/build/include
Compiled by keith@titan

Features: +acl +iconv +tui
sslivkoff commented 4 years ago

This is caused by the ScrollBlockBottom highlight group failing to reverse the color for the bottom block

Unicode only provides fine-grained characters for the bottom of a block (▁▂▃▄▅▆▇█) not the top. To use these at the bottom of a fine-grained scrollbar, their fg/bg need to be reversed. This is accomplished with highlight ScrollBlockBottom gui=reverse

I've been using v0.5.0-200-gee1199eab which is older than your build. It also works for me in the latest v0.5.0-404-g49cd750d6.

Maybe there is an interaction with one of your other plugins. Can you try disabling them to see?

khughitt commented 4 years ago

Hi @sslivkoff ,

Apologies for the slow response. I finally got around to checking on a clean nvim config with the latest nightly build of neovim, and I still get the same artifacts..

init.vim:

call plug#begin()
    Plug 'sslivkoff/vim-scroll-barnacle'
call plug#end()

highlight link Scrollbar Float

version:

NVIM v0.5.0-421-ga8f784192
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -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/home/keith/.cache/yay/neovim-git/src/neovim-git/build/config -I/home/keith/.cache/yay/neovim-git/src/neovim-git/src -I/usr/include -I/home/keith/.cache/yay/neovim-git/src/neovim-git/build/src/nvim/auto -I/home/keith/.cache/yay/neovim-git/src/neovim-git/build/include
Compiled by keith@titan

Features: +acl +iconv +tui
See ":help feature-compile"

I tried a couple different terminals, just to be sure it wasn't specific to Termite, but the same issue occurs with kitty and xterm as well.

Just let me know if there is anything else you would like me to check.

you-n-g commented 3 years ago

Your scrollbar plugin is great. I've got the same issue. It will be great if such issue could be fixed.

you-n-g commented 3 years ago

At last, I fixed this issue by adding highlight ScrollBlockBottom gui=reverse cterm=reverse into my init.vim