Skip to content

Conversation

shadmansaleh
Copy link
Member

@shadmansaleh shadmansaleh commented May 27, 2025

The basic idea is that we don't process refresh events just as they come. We queue them and process them every certain time quantum (by default 60fps). Under this, previous timers as well as autocmds all become refresh events. The event queue should be empty 99% of the time, there's a quick check for that. So, although this check is being performed quite often performance impact shouldn't be negligible. This should hopefully let us have a snappy experience with fewer refreshes, without flicker.

Todo:

  1. check if a more granular separation of refresh event in queue is necessary.
  2. refactor the refresh system to separate module (at some point)
  3. check if newer autocmd api is available from nvim-0;.7

fixes #1358

@shadmansaleh shadmansaleh force-pushed the feat/autocmd-refersh-under-timer branch from a2c6ce5 to 539c974 Compare May 27, 2025 03:43
The basic idea is that we don't process refresh events just as they come. We queue them and process them every certain time quantum (by default 60fps). Under this, previous timers as well as autocmds all become refresh events. The event queue should be empty 99% of the time, there's a quick check for that. So, although this check is being performed quite often performance impact shouldn't be negligible. This should hopefully let us have a snappy experience with fewer refreshes, without flicker.
@shadmansaleh shadmansaleh merged commit 556e99f into master Jun 8, 2025
7 checks passed
@shadmansaleh shadmansaleh deleted the feat/autocmd-refersh-under-timer branch June 8, 2025 11:50
andreihh added a commit to andreihh/dotfiles that referenced this pull request Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Lualine is not refreshing on events/autocmds anymore
1 participant