helpers.source() was a hack to work around the lack of anonymous
:source. Its "create tempfile" behavior is not a required part of most
tests that use it.
Some tests still need the old "create tempfile" behavior either because
they test SID behavior, or because of missing nvim_exec features: #16071
Since https://github.com/neovim/neovim/pull/17790 being merged means we can assume the value of `STATUS_HEIGHT` to always be 1, this commit removes code that's unnecessary if `STATUS_HEIGHT` is 1.
Problem: Crash when switching window in BufWipeout autocommand.
Solution: Put any buffer in the window to avoid it being NULL.
(closesvim/vim#10024)
347538fad0
win_init_empty() cannot be made static because it is used in autocmd.c
1. Add new pattern `runtime/doc/**`. This is a common case were the
contributor modifies only the help file but the doc gen would discard
their changes.
2. Add to the output what the changes after running doc gen would be.
[skip ci]
Problem: May end up with no current buffer.
Solution: When deleting the current buffer to not pick a quickfix buffer as
the new current buffer.
e3537aec2f
The test cannot be ported as-is because Nvim doesn't support "-Z"
command line argument. Just use only "--clean" instead.
Problem: Using freed memory with :lopen and :bwipe.
Solution: Do not use a wiped out buffer.
9b4a80a665
Cherry-pick some indent changes from patch 8.2.1432.
Problem: Visual area not fully updated when removing sign in Visual mode
while scrolling.
Solution: Adjust check for topline. (closesvim/vim#10017)
abb6fbd14d
Problem: Autocmd not executed when editing a directory ending in a path
separator inside try block.
Solution: Return NOTDONE instead of FAIL. (closesvim/vim#8885)
40fa12aea3
Uses of `getline` in `filetype.lua` currently assume it always returns a
string. However, if the buffer is unloaded when filetype detection runs,
`getline` returns `nil`. Fixing this prevents errors when filetype
detection is run on unloaded buffers.
vim.tbl_get takes a table with subsequent string arguments (variadic) that
index into the table. If the value pointed to by the set of keys exists,
the function returns the value. If the set of keys does not exist, the
function returns nil.
On TUI startup write the CSI sequence that signals to the controlling
terminal that Neovim supports the CSI u scheme for encoding modifiers
documented in [1].
This is similar to, but distinct from, Vim's usage of the `t_TI` and
`t_TE` variables to handle Xterm's `modifyOtherKeys` setting. For a
longer explanation on those differences see [2]. Since Neovim uses
libtermkey for key input handling, we use the CSI u encoding rather than
Xterm's modifyOtherKeys encoding.
[1]: http://www.leonerd.org.uk/hacks/fixterms/
[2]: https://invisible-island.net/xterm/modified-keys.html
vim-patch:8.2.4614: redrawing too much when 'cursorline' is set
Problem: Redrawing too much when 'cursorline' is set and jumping around.
Solution: Rely on win_update() to redraw the current and previous cursor
line, do not mark lines as modified. (closesvim/vim#9996)
c20e46a4e3
This doesn't match the patch exactly, because I missed some lines when
porting patch 8.1.2029, and these lines were removed in this patch.
This also makes win_update() always update for 'concealcursor' like how
it always updates for 'cursorline', as 'cursorline' and 'concealcursor'
redrawing logic has been unified in Nvim.
As redrawing for 'cursorline' now always only requires VALID redraw
type, it is no longer necessary to call redraw_for_cursorline() in
nvim_win_set_cursor().
Problem: Cursor line not updated when a callback moves the cursor.
Solution: Check if the cursor moved. (closesvim/vim#9970)
e7a74d5375
redraw_after_callback() is N/A. Nvim handles timers on the main loop.