Bekaboo / dropbar.nvim

IDE-like breadcrumbs, out of the box
GNU General Public License v3.0
1.04k stars 24 forks source link

[Bug]: Scrollbar doesn't consistently update #93

Closed willothy closed 1 year ago

willothy commented 1 year ago

Description

When moving in the menu, the scrollbar jumps around and sometimes does not move at all.

nvim version

0.10 nightly

dropbar.nvim version

b4b6b4a

Operating system and version

Linux

Minimal config

local tmp = vim.env.TMPDIR
  or vim.env.TEMPDIR
  or vim.env.TMP
  or vim.env.TEMP
  or '/tmp'
local data = tmp ..  '/' .. (vim.env.NVIM_APPNAME or 'nvim')
local packages_root = data .. '/site'
local cloned_root = packages_root .. '/pack/packages/start'
local cloned_path = cloned_root .. '/dropbar.nvim'
local url = 'https://github.com/Bekaboo/dropbar.nvim.git'

vim.fn.mkdir(cloned_root, 'p')
vim.opt.pp:prepend(packages_root)
vim.opt.rtp:prepend(packages_root)

if not vim.loop.fs_stat(cloned_path) then
  vim.fn.system({ 'git', 'clone', url, cloned_path })
end

require('dropbar').setup()

Steps to reproduce

  1. Open a menu with a scrollbar
  2. Scroll to the bottom of the menu, and back up, one entry at a time.
  3. Sometimes the scrollbar will jump to the bottom, sometimes it won't update at all

Expected behavior

Scrollbar should move when the window / cursor scrolls.

Actual behavior

Scrollbar jumps around or does not move at all.

Additional information

Likely caused by 2debe824bc98f6fcdc5ab0d4ec1573f6e5befd15 - tested, reverting that commit fixes the issue.

willothy commented 1 year ago

Perhaps the scrollbar changes should've been marked as breaking, since the hlgroup changes messed up my config.

And maybe the background could be optional? I personally prefer a floating scrollbar.

Edit: floating scrollbar in #96.

willothy commented 1 year ago

Another issue: the scrollbar does not always stop at the last line of the window when cursor is on the last line - the scrollbar thumb can sometimes end up one line above the bottom line instead.

Bekaboo commented 1 year ago

Perhaps the scrollbar changes should've been marked as breaking

Already marked as breaking in eac1b2661fa139d934215cb20989aaed79861ea1 because it changed the default highlight

willothy commented 1 year ago

Perhaps the scrollbar changes should've been marked as breaking

Already marked as breaking in eac1b26 because it changed the default highlight

Perfect, didn't see that! My bad. It only required a small change anyways :)

Bekaboo commented 1 year ago

Another issue: the scrollbar does not always stop at the last line of the window when cursor is on the last line - the scrollbar thumb can sometimes end up one line above the bottom line instead.

Should be fixed by dc11786

the scrollbar jumps around and sometimes does not move at all.

Any way to reproduce it?