-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModeChanged event is constantly triggered till 100% cpu uses with scheduled callback function #22263
Labels
Comments
shadmansaleh
added a commit
to nvim-lualine/lualine.nvim
that referenced
this issue
Feb 14, 2023
Mitigation for #967 This happens primarily because of neovim/neovim#22263 To prevent this from affecting lualine. Mode changed event for op-pending mode no longer gets scheduled. As a side effect lualine no longer properly refreshes upon switching to op-pending mode.
2 tasks
Hi, |
Relevant Codes:
|
craigmac
pushed a commit
to craigmac/lualine.nvim
that referenced
this issue
May 15, 2024
Mitigation for nvim-lualine#967 This happens primarily because of neovim/neovim#22263 To prevent this from affecting lualine. Mode changed event for op-pending mode no longer gets scheduled. As a side effect lualine no longer properly refreshes upon switching to op-pending mode.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If callback function of a ModeChanged autocmd schedules some operations with
vim.schedule
ModeChaged event constantly gets triggered switching between mods 'n' and 'no' when user switches to operator pending mode. As a result the callback gets called again and again until nvim saturates the cpu.,
Steps to reproduce
file minimal_init.lua
Open neovim with the minimal config
go into operator pending mode by pressing
d
for example.Expected behavior
The ModeChanged event should get triggerd only once and the callback should be ran only once.
Neovim version (nvim -v)
0.9.0 commit 264fb69
Vim (not Nvim) behaves the same?
no. vim doesn't really have vim.schedule
Operating system/version
Arch Linux
Terminal name/version
kitty
$TERM environment variable
xterm-kitty
Installation
build from repo
The text was updated successfully, but these errors were encountered: