shellRaining / hlchunk.nvim

This is the lua implementation of nvim-hlchunk, you can use this neovim plugin to highlight your indent line and the current chunk (context) your cursor stayed
MIT License
628 stars 31 forks source link

Indent lines get cleared on one window if scrolling the same buffer in another window #84

Closed jbarap closed 4 months ago

jbarap commented 9 months ago

Describe the bug When viewing a single buffer in two windows simultaneously, the active window behaves as expected, but when scrolling the buffer on the active window, the indent lines on the secondary window get gradually cleared.

To Reproduce Steps to reproduce the behavior:

  1. Open any file, and go to a section with indent lines displayed (in the example neovim/src/nvim/eval/funcs.c)
  2. Open a vertically split window (ctrl-w v)
  3. Scroll the buffer down in one window
  4. Watch as the indents disappear in the other window

Expected behavior As long as a buffer is visible in a window from the active tab, the indent guides should stay visible in each window's viewport.

Screenshots Both windows with indents: image

As the right window is scrolled, the indents in the left window get cleared: image

Additional context Config:

      require("hlchunk").setup({
        indent = {
          chars = {
            "▏",
          },
        },
        blank = {
          enable = false,
        },
        chunk = {
          enable = false,
        },
        line_num = {
          enable = false,
        }
      })

Great job with the plugin!

shellRaining commented 9 months ago

thanks for detail report~

because render range only include current window, other part of same buffer will clear while rendering, this will be solved in next version

jbarap commented 9 months ago

Thank you, looking forward to the next version!

shellRaining commented 4 months ago

fixed in latest version