-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixup: fix flickering in lualine (#1316)
* Fixup: fix flickering in lualine debounce updates for 100ms while setting the options todo: fix the test properly * fix: delay in first set Don't delay setting options when it's unset * enhance: handle quick redraws better When multiple redraws in debounce period just pick the most frequent one with bias toward old one. * fixup: No more refreshing on autocmd Though refreshing on autocmd allows us to refresh less. But not always for example when scrolling it can get pretty frequent refresh due to CursorMoved. But this whole refresh on autocmd causes way too many bugs due to various conflicts and inconsistencies. Instead now lualine will only refresh on timer. To make lualine resoponsive as before refresh time has been reduced to 100ms from 1s. Means now lualine would refresh 10 times per second by default. * fixup: fix 1st render delay after autocmd refresh removal * fixup: fix error when trying to set options to already deleted buffer or window * remove debounce
- Loading branch information
1 parent
640260d
commit 0978a6c
Showing
5 changed files
with
35 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0978a6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this commit, the option 'disabled_filetypes' doesn't seem to work anymore...
0978a6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the flickering issues for me, many thanks.
Is there a reason why CursorMoved and CursorMovedI were ever required in the autocmd though? I'm not sure of any use cases where there is a mode change caused by either of these two events (although that doesn't mean there aren't any) and simply removing these also appears to fix the problem (as noted in #1076).
0978a6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this commit seem to cause some problems. My setup was buggy and laggy after i updated my lualine plugin using lazy plugin manager. The tabline focus was delayed, nvim as a whole was slow. If anyone is facing the same problem do give a thumbs up so that the maintainers can look into the commit again and revise it.
0978a6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvim as a whole isn't slow, this commit just prevents lualine from refreshing on autocmd which makes it feel really slow and sluggish. i do not want lualine to be forced to refresh every 20ms for it to not feel garbage! i'll be staying on the commit before this until they decide to restore the autocmd functionality, otherwise i'll be switching to another plugin.
0978a6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that removing refresh on autocmds is a bad design decision, and have opened an issue about it: #1358