neovim/test/functional/autocmd
zeertzjq 640680ccce
vim-patch:9.0.2134: ml_get error when scrolling (#26264)
Problem:  ml_get error when scrolling after delete
Solution: mark topline to be validated in main_loop
          if it is larger than current buffers line
          count

reset_lnums() is called after e.g. TextChanged autocommands and it may
accidentally cause curwin->w_topline to become invalid, e.g. if the
autocommand has deleted some lines.

So verify that curwin->w_topline points to a valid line and if not, mark
the window to have w_topline recalculated in main_loop() in
update_topline() after reset_lnums() returns.

fixes: vim/vim#13568
fixes: vim/vim#13578

c4ffeddfe5

The error doesn't happen in Nvim because Nvim triggers TextChanged after
calling update_topline().

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-29 13:24:24 +08:00
..
autocmd_oldtest_spec.lua vim-patch:9.0.2134: ml_get error when scrolling (#26264) 2023-11-29 13:24:24 +08:00
autocmd_spec.lua refactor(options): deprecate nvim[_buf|_win]_[gs]et_option 2023-05-21 15:14:01 +06:00
bufenter_spec.lua tests: use runtime from build for doc/tags with :help (#10479) 2019-08-28 22:47:54 +02:00
bufmodifiedset_spec.lua test: update BufModifiedSet to be paranoid 2020-11-09 04:06:53 -05:00
cmdline_spec.lua refactor: remove E5500, adjust tests 2023-01-16 18:03:08 +08:00
cursorhold_spec.lua refactor(options): deprecate nvim[_buf|_win]_[gs]et_option 2023-05-21 15:14:01 +06:00
cursormoved_spec.lua fix(events): avoid unnecessary CursorMoved (#24675) 2023-08-12 09:50:17 +08:00
dirchanged_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
filetype_spec.lua tests: use runtime from build for doc/tags with :help (#10479) 2019-08-28 22:47:54 +02:00
focus_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
modechanged_spec.lua test: scheduled callback shouldn't trigger ModeChanged repeatedly 2023-04-26 23:57:09 +08:00
recording_spec.lua feat(autocmd): populate v:event in RecordingLeave (#16828) 2022-01-04 18:55:29 -07:00
safestate_spec.lua test: add some tests for SafeState autocommand 2023-08-21 14:16:16 +08:00
searchwrapped_spec.lua feat: add autocommand event when search wraps around (#8487) 2021-12-10 12:28:25 -07:00
show_spec.lua perf(events): store autocommands in flat vectors (#23256) 2023-04-27 19:25:08 +02:00
signal_spec.lua test: simplify platform detection (#21020) 2022-11-22 08:13:30 +08:00
tabclose_spec.lua API: deprecate nvim_command_output 2019-12-02 20:52:06 -08:00
tabnew_spec.lua Windows: enable more tests 2017-01-13 01:17:12 +01:00
tabnewentered_spec.lua fix(ui): trigger TabNewEntered after split new tab 2023-10-07 16:40:57 +08:00
termxx_spec.lua fix(terminal): assign channel to terminal earlier (#25771) 2023-10-25 09:59:02 +08:00
textchanged_spec.lua vim-patch:9.0.2075: TextChangedI may not always trigger (#25808) 2023-10-28 10:42:18 +08:00
textyankpost_spec.lua vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register (#23817) 2023-05-30 07:18:12 +08:00
win_scrolled_resized_spec.lua test(winscrolled): make sure floating window is drawn (#25639) 2023-10-14 20:09:49 +08:00