nvimdev / dashboard-nvim

vim dashboard
MIT License
2.34k stars 190 forks source link

Doom: Column value outside range when resizing small windows sizes #461

Closed polirritmico closed 3 months ago

polirritmico commented 3 months ago

Describe the bug Sometimes working with small Neovim terminal windows and moving the cursor raises this error:

Error detected while processing CursorMoved Autocommands for "<buffer=1>":
Error executing lua callback: ...ectos/Neovim/dashboard-nvim/lua/dashboard/theme/doom.lua:142: Column value outside range
stack traceback:
    [C]: in function 'nvim_win_set_cursor'
    ...ectos/Neovim/dashboard-nvim/lua/dashboard/theme/doom.lua:142: in function <...ectos/Neovim/dashboard-nvim/lua/dashboard/theme/doom.lua:119>

To Reproduce

  1. In a small terminal window, the font and window size is key here. In the video font is at 15pt and 68 x 33 characters size.
  2. First open neovim and move the cursor.
  3. Move the cursor to an entry with a multirow character icon. Works fine
  4. Resize the window to a smaller size
  5. Resize the window back to the previous working size
  6. Move the cursor to the same entry. Raise the error.

Check the video:

https://github.com/nvimdev/dashboard-nvim/assets/24460484/523ef9cd-d515-4a70-9c91-25e397569745

polirritmico commented 3 months ago

Fix by #462