aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd/cursorhold_spec.lua
Commit message (Collapse)AuthorAge
* test(harness): migrate away from magic globalsJustin M. Keyes2026-07-21
| | | | | | | | | | | | | | | | | | | | | Problem: The magic globals `it`, `describe`, etc., are more trouble than they are worth. - Hooking into `after_each` requires `getfenv()` hacks. - They confuse luals/emmylua, because the top-level `.luarc.json` isn't merged with `test/.luarc.json` (apparently a luals limitation?) - They totally defeat discoverability because the user just has to "know" about the various magic symbols. So they harm DX, which means they serve no purpose at all. Solution: - Expose the test API from `testutil`, so tests can call `t.it()`, `t.describe()`, etc., in the conventional way. - Drop `getfenv()` hacks. - Drop the `setfenv()` injection in `load_chunk`. - Drop `test/_meta.lua`.
* test: unreliable "CursorHold not triggered after only K_EVENT on startup" #40863Justin M. Keyes2026-07-20
| | | | | | | | | | | | | | | Problem: FAILED …/cursorhold_spec.lua @ 73: CursorHold is not triggered after only K_EVENT on startup Expected values to be equal. Expected: 1 Actual: 0 stack traceback: …/cursorhold_spec.lua:79: in function <…/cursorhold_spec.lua:73> Solution: Retry instead of hardcoding sleep(50).
* vim-patch:9.1.1413: spurious CursorHold triggered in GUI on startup (#34195)zeertzjq2025-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: spurious CursorHold triggered in GUI on startup Solution: init global did_cursorhold flag to true (Gary Johnson) When Vim is started in GUI mode, the CursorHold autocommand event is triggered 'updatetime' milliseconds later, even when the user has not pressed a key. This is different from the behavior of Vim in terminal mode, which does not trigger a CursorHold autocommand event at startup, and contradicts the description of the CursorHold event in ":help CursorHold", which states that the event is "[n]ot triggered until the user has pressed a key". The fix is to change the initial value of did_cursorhold from FALSE to TRUE. While it is true that the CursorDone event has not been done yet at startup, it should appear to have been done until the user presses a key. fixes vim/vim#17350 closes: vim/vim#17382 https://github.com/vim/vim/commit/318ff9c3627f595905064d11b0d66b63bfe89ff1 Co-authored-by: Gary Johnson <garyjohn@spocom.com>
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: typing for helpers.methsLewis Russell2024-01-12
|
* test: remove helpers.sleep()Lewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* fix: assert failure when changing 'ut' while waiting for CursorHold (#20241)zeertzjq2022-09-18
|
* fix(events): make CursorHold behave as documentedzeertzjq2022-09-17
|
* Fix missing CursorHoldI events (#3758)Daniel Hahler2019-07-16
Fixes https://github.com/neovim/neovim/issues/3757.