nvimdev / dashboard-nvim

vim dashboard
MIT License
2.35k stars 192 forks source link

Resizing on the dashboard buffer on wezterm/xterm hangs for quite some time #235

Closed DrKGD closed 1 year ago

DrKGD commented 1 year ago

Describe the bug Dashboard buffer tends to hang while resizing the terminal window. Not quite sure if it is reproducible or something fishy is going on with my setup.

I also tried disabling some plugins which requires redrawing, such as the statusline, without any success. Possibly unrelated to dashboard-nvim, but for me it severly impacts the usability of this plugin.

To Reproduce Steps to reproduce the behavior:

  1. Open a new wezterm/xterm instance.
  2. Start nvim instance with dashboard-nvim enabled
  3. Resize the nvim client.
  4. Nvim instance hangs, forcing me to forcefully kill the terminal.

Expected behavior Not to hang, I'd expect some lag for the VimResize event spam, like with the kitty terminal, but this eventually obliges me to kill the wezterm instance instead.

Screenshots, Demos

Wezterm

https://user-images.githubusercontent.com/44092476/211167349-f4f521ad-1f4b-4b57-9bed-05eaa505aec4.mp4

Kitty

https://user-images.githubusercontent.com/44092476/211167910-89c04459-51a8-4e0f-ac77-d69c0de19083.mp4

My configuration Tested on wezterm, xterm, kitty

Configuration with lazy.nvim ``` return { 'glepnir/dashboard-nvim', lazy = false, config = function() local dash = require('dashboard') local ifmt = "%-5s" local fmt = "» %-35s" local sfmt = "» %15s" dash.custom_header ={ -- THX: https://github.com/tribela/tbraille -- Generated with tbraille, font=Monocraft, size=15 "⣤⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⠀⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄ ", "⣿⠀⠀⣿⡇⣴⠶⠶⣦⡄⠰⠶⠶⣦⡄⠰⢾⡷⠆⠀⣿⣰⠶⣦⡄⠰⠶⠶⣦⡄⣶⣰⠶⣆⡀⠰⢾⡷⠆⠀⣴⠶⠶⣦⡄", "⣿⠀⠀⣿⡇⣿⠛⠛⠛⠃⣼⠿⠛⣿⡇⠀⢸⡇⠀⠀⣿⠉⠀⣿⡇⣼⠿⠛⣿⡇⣿⠉⠀⠉⠁⠀⢸⡇⠀⠀⣿⠛⠛⠛⠃", "⠛⠛⠛⠋⠁⠙⠛⠛⠛⠃⠙⠛⠛⠛⠃⠀⠈⠛⠛⠃⠛⠀⠀⠛⠃⠙⠛⠛⠛⠃⠛⠀⠀⠀⠀⠀⠈⠛⠛⠃⠙⠛⠛⠛⠃", } dash.custom_footer = { [[. ,-"-. ,-"-. ,-"-. ,-"-. ,-"-. ,]], [[ X | | \ / | | X | | \ / | | X | | \ / ]], [[/ \| | |X| | |/ \| | |X| | |/ \| | |X| ]], [[ `-!-' `-!-" `-!-' `-!-' `-!-' `-]], } dash.sessions_auto_save_on_exit = false dash.session_verbose = false dash.hide_statusline = false dash.hide_tabline = false dash.hide_winbar = false local cond = require('util.lzy').cond local dashboard_center = { } cond('auto-session', function() -- Restore last session dashboard_center[#dashboard_center + 1] = { icon = ifmt:format(" "), desc = fmt:format("Restore last session for cwd"), action = 'RestoreSession', shortcut = sfmt:format('') } end) cond({ 'telescope', 'auto-session', 'session-lens' }, function() -- Restore a previous session dashboard_center[#dashboard_center + 1] = { icon = ifmt:format("ﯸ "), desc = fmt:format("Find a recent session"), action = 'SearchSession', shortcut = sfmt:format('unbinded') } end) cond('telescope', function() -- Find files with telescope dashboard_center[#dashboard_center + 1] = { icon = ifmt:format(" "), desc = fmt:format("Find file"), action = 'DDTSFindFiles', shortcut = sfmt:format('.') } end) -- Find files with telescope dashboard_center[#dashboard_center + 1] = { icon = ifmt:format(" "), desc = fmt:format("Move to nvim configuration"), action = ('cd %s'):format(vim.fn.stdpath('config')), shortcut = sfmt:format('unbinded') } dash.custom_center = dashboard_center end } ```

Thanks!

glepnir commented 1 year ago

so that's mean it hang in wezterm not in kitty?

DrKGD commented 1 year ago

Yes, this behaviour manifests in both wezterm and xterm (not really planning to use xterm, just testing multiple terminals); did some further testing and somehow it could happen with stock (= no configuration) kitty by repeatedly resizing the window. Is it supposed to happen?

glepnir commented 1 year ago

I'm not sure since I use a window manager. So this operation has not been tried. But frequent triggering of vimresized may cause some calculation problems. I will try to do some work on the next version

DrKGD commented 1 year ago

Understandable, I also tend to use wm as well (i3, awesomewm), It is more of a stress test really, not a priority, just testing things out and was just worried that I messed up something in my configuration. Thanks anyway for now!