lualine.nvim icon indicating copy to clipboard operation
lualine.nvim copied to clipboard

Bug: flicker when running keymap

Open Rahlir opened this issue 1 year ago • 5 comments

Self Checks

  • [x] I'm using the latest lualine.
  • [x] I didn't find the issue in exsisting issues or prs.

How to reproduce the problem

Map a key to a command. Good example can be seen when using delimitmate plugin where there are imaps for <space> and <bs>. You can also add your own maps, such as map m :echo "hello"<cr>, but for the very simple keymaps the flicker doesn't happen every time, only sometimes. But if you try running this keymap repeatedly in quick succession you should see the flicker even with this simple map.

Expected behaviour

No flicker of lualine should occur when you run the keymap.

Actual behaviour

Lualine flickers. Mode seems to switch for a split second to command and this redraws the lualine.

Aditional information

This bug is most apparent when other plugins are involved (such as delimitmate). However, this is clearly an issue with lualine, not other plugins. Of course those keymaps do cause vim to switch to command mode and back, but I think lualine should be able to filter out these super short switches caused by keymaps.

Rahlir avatar Nov 06 '22 17:11 Rahlir