Problem: Modifying a hidden buffer still interferes with prompt buffer
mode changes.
Solution: Save and restore b_prompt_insert.
(zeertzjq)
closes: vim/vim#13875
Modifying hidden buffer still interferes with prompt buffer mode changes
f267847017
Problem: Insert mode not stopped if an autocommand modifies a hidden
buffer while closing a prompt buffer.
Solution: Don't set b_prompt_insert if stop_insert_mode is already set.
(zeertzjq)
closes: vim/vim#1387296958366ad
Since execl() is a variadic function, it requries a NULL-terminal to
indicate the end of its argument list, c.f. exec(3)
> The first argument, by convention, should point to the filename
> associated with the file being executed. The list of arguments *must*
> be terminated by a null pointer
This fixes the failure seen on aarch64 and i386, due to garbage data
being considered part of the variadic arguments.
(cherry picked from commit 8861ad83fd)
As specified by MAINTAIN.md, features should be soft deprecated at first
(meaning no warnings) to give people a chance to adjust. The problem
with this approach is that deprecating a feature becomes harder than
usual as during the soft deprecation period you need to remember not to
issue a warning, and during the hard deprecation period you need to
remember to start issuing a warning.
This behavior is only enforced if the `plugin` parameter is `nil` as
plugins may not want this specific behavior.
(cherry picked from commit 0a598c13b1)
Problem: `functional/vimscript/api_functions_spec` skips a test if the
runtime files are not generated, but this check was broken in a
refactor.
Solution: Since runtime files are now generated for all test targets, do
not skip this test.
(cherry picked from commit 2df8a81e21)
Allow a "*count" suffix in a screen line to repeat the screen line for
"count" times.
The change is made to Screen:expect() and Screen:get_snapshot() instead
of Screen:render() so that screen expectations generated using code can
still work and test failures can still be readable.
A snapshot is now also printed on failure so that there is no need to
run the test again with Screen:snapshot_util().
Problem: reg_executing() returns wrong result in :normal with range
when 'showcmd' is set (after 8.2.4705).
Solution: Reset "pending_end_reg_executing" when executing a register.
closes: vim/vim#13707615202bd0e
(cherry picked from commit 2d1143f285)
Problem: screenpos() may crash with neg. column
Solution: validate and correct column
closes: vim/vim#13669ec54af4e26
(cherry picked from commit 6052fac625)
Problem: 'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.
closes: vim/vim#13624588f20dece
Problem:
With vim.treesitter.foldexpr, `o`-ing two lines above a folded region
opens the fold. This does not happen with legacy foldexprs. For example,
make a markdown file with the following text (without indentation),
enable treesitter fold, and follow the instruction in the text.
put cursor on this line and type zoo<Esc>
initially folded, revealed by zo
# then this fold will be opened
initially folded, revealed by o<Esc>
Analysis:
* `o` updates folds first (done in `changed_lines`), evaluating
foldexpr, and then invokes `on_bytes` (done in `extmark_splice`).
* Treesitter fold allocates the foldinfo for added lines (`add_range`)
on `on_bytes`.
* Therefore, when treesitter foldexpr is invoked while running `o`, it
sees outdated foldinfo.
Solution:
`extmark_splice`, and then `changed_lines`. This seems to be the
standard order in other places, e.g., `nvim_buf_set_lines`.
09d4133 changed blocknr_T from long to int64_t, so pe_bnum is now always 64-bit. This was an incompatible change in the swapfile format for 32-bit systems, but there have been no complaints in the past 9 years so just adjust the test.
(cherry picked from commit a1ded1b113)
Problem: Using negative array index with negative width window.
Solution: Make sure the window width does not become negative.
8279af514c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using freed memory with cmdwin and BufEnter autocmd.
Solution: Make sure pointer to b_p_iminsert is still valid.
1c3dd8ddcb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Reading before the start of the line.
Solution: When displaying "$" check the column is not negative.
e98c88c44c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Confusing error when using "q:" in command line window.
Solution: Check for the situation and give a better error message.
(closesvim/vim#10756)
c963ec31a0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
backport #26034
Problem:
'nofsync' may lose data if the system has a hard shutdown. #9888
Solution:
Change default to 'fsync'. This may be revisited in the future when
'nofsync' can be made safer.
Co-authored-by: Ploum <1233155+ploum@users.noreply.github.com>
Problem:
The next command after `silent !{cmd}` or `silent lua print('str')`
prints an empty line before printing a message, because these commands
set `msg_didout = true` despite not printing any messages.
Solution:
Set `msg_didout = true` only if `msg_silent == 0`