Problem: "P" in Visual mode still changes some registers.
Solution: Make "P" in Visual mode not change any register. (Shougo
Matsushita, closesvim/vim#10349)
509142ab7a
(cherry picked from commit 28c74ef687)
Problem: When closing help window autocmds triggered for the wrong window.
Solution: Figure out the new current window earlier. (closesvim/vim#10348)
2a2707d033
(cherry picked from commit 71580dfef4)
Problem: :startinsert right after :stopinsert does not work when popup menu
is still visible.
Solution: Use ins_compl_active() instead of pum_visible(). (closesvim/vim#10352)
cd5dbad184
(cherry picked from commit 97d86c45af)
This avoids ignoring too many match results, and avoid highlighting
being blank in some files.
(cherry picked from commit e453b6391e)
Co-authored-by: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
In a locale "en_US", "en" is the language and "US" is the region.
Before this change, we were too clever for our own good and tried to handle the
region as well. But if the macOS primary language is set to "English" and the
region to "Norway", we would end up with "en_NO", which is a locale that does
not exist.
Now we only take the language into account. Taking the example from above would
yield "en_US", which is a sensible fallback.
If the region is important to you, set $LANG and the more specific LC_*
variables in your shell config or alternatively use `:help :language`.
References https://github.com/neovim/neovim/issues/18292
(cherry picked from commit e038625b87)
When 'F' is in 'shortmess', don't show messages when editing a
directory. This fixes a regression introduced by 0956283.
(cherry picked from commit c9f90ee687)
Co-authored-by: Gregory Anders <greg@gpanders.com>
The default value of including F in 'shortmess' has the unfortunate side
effect of hiding output from autocommands. This is a common source of
confusion and often leads people to think their autocommands are not
working when they are. There is a small snippet in the docs for
'shortmess' indicating that the F flag suppresses autocmd output, but
it's not easy to find if you don't already know to look for it.
This commit removes that behavior of the F flag to make it only suppress
file info when opening a new file.
(cherry picked from commit 09562839c3)
Co-authored-by: Gregory Anders <greg@gpanders.com>
`vim.keymap.del` takes an `opts` parameter that lets caller refer to and
delete buffer-local mappings. For some reason the implementation of
`vim.keymap.del` mutates the table that is passed in, setting
`opts.buffer` to `nil`. This is wrong and also undocumented.
(cherry picked from commit 51f33ae5c0)
* fix(treesitter): create new parser if language is not the same as cached parser
Fixes#18148
(cherry picked from commit 8e35894fc2)
* test: create new parser in vim.treesitter.get_parser() when filetype changes
(cherry picked from commit 30e7b3f0a2)
Co-authored-by: Chinmay Dalal <dalal.chinmay.0101@gmail.com>
Use nvim_exec_autocmds to issue the DiagnosticChanged autocommand,
rather than nvim_buf_call, which has some side effects when drawing
statuslines.
(cherry picked from commit 4a64ce140f)
Co-authored-by: Gregory Anders <greg@gpanders.com>
Problem: Test is not cleaned up.
Solution: Make test clean up after itself. Avoid NUL. (closesvim/vim#10233)
7851c69a12
Adapt test_autocmd_vimgrep() to Nvim.
(cherry picked from commit 5e9afca1c1)
Problem: Autocmd events triggered in different order when reusing an empty
buffer.
Solution: Call buff_freeall() earlier. (Charlie Groves, closesvim/vim#10198)
fef4485ef5
Test failure becomes very strange.
(cherry picked from commit f531fb97ff)
Problem: Using freed memory when using an autocommand to split a window
while a buffer is being closed.
Solution: Disallow splitting when the buffer has b_locked_split set.
983d83ff1c
Put the error message in window.c.
Cherry-pick a memory leak fix from Vim patch 8.2.0399.
Test still fails.
(cherry picked from commit 1664e3d4bc)
Problem: Using freed memory when window is closed by autocommand.
(houyunsong)
Solution: Check the window pointer is still valid.
2c7080bf1c
Add missing comment from Vim patch 8.0.1420.
Test fails.
(cherry picked from commit 69ac382a28)
Problem: Crash when using command line window in an autocommand.
(houyunsong)
Solution: Save and restore au_new_curbuf.
aad5f9d79a
Nvim has removed :open, so use :edit in the test instead.
(cherry picked from commit fa15f2f938)
Problem: Autocommand that splits window messes up window layout.
Solution: Disallow splitting a window while closing one. In ":all" give an
error when moving a window will not work.
1417c766f5
Expected error number was changed to E242 in Vim in patch 8.2.1183, and
patch 8.2.2420 (which has already been ported) made the test no longer
throw E249 in Vim, so just use E242 in the test.
(cherry picked from commit 9b10b4cc64)
Problem: A second popup window with terminal causes trouble.
Solution: Disallow opening a second terminal-popup window. (closesvim/vim#6101,
closesvim/vim#6103) Avoid defaulting to an invalid line number.
b5383b174b
This is the only applicable hunk.
(cherry picked from commit 2116ff47ea)