A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/issues/12587 below:

autocmd CursorHold and CursorHoldI are blocked by timer_start() · Issue #12587 · neovim/neovim · GitHub

⚠️ we only talk about CursorHold here, but the same bug also applies for CursorHoldI ⚠️

NVIM v0.5.0-575-g225f0bcd9
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/antoine/src/neovim/build/config -I/home/antoine/src/neovim/src -I/home/antoine/src/neovim/.deps/usr/include -I/usr/include -I/home/antoine/src/neovim/build/src/nvim/auto -I/home/antoine/src/neovim/build/include
Steps to reproduce using nvim -u NORC

Then, source test.vim where test.vim is:

set updatetime=100

autocmd CursorMoved * echom "CursorMoved"
autocmd CursorHold  * echom "CursorHold"

function! s:timer_callback(timer_id)
endfunction

let w:matchup_timer = timer_start(50,
      \ function('s:timer_callback'),
      \ {'repeat': -1})
Actual behaviour

neovim never echoes CursorHold, only CursorMoved
vim echoes both CursorHold and CursorMoved

This seems to indicate that neovim CursorHold autocmd can be blocked by timers, when vim uses a different thread to deal with CursorHold?

Note: when timer_start's delay is greater than update_time, neovim displays CursorHold, but it seems more laggy than vim.

Expected behaviour

I expect CursorHold execution not to depend on whether timers are running or not.
Especially when this results in blocking it completely or making it laggy.

Also, thanks a lot for this amazing editor ❤️

Thanks,
Antoine

lambdalisue, Shougo, runiq, svermeulen, carloscoves and 35 moreyueyingjuesha, nerd190, joelpalmer, adelarsq, kuator and 1 morealexaandru, nerd190, UltiRequiem, adelarsq, kuator and 1 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4