Errors were being caused by invalid buffers being kept around in
diagnostic_cache, so add a metatable to diagnostic_cache which attaches
to new buffers in the cache, removing them after they are invalidated.
Closes#16391.
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Problem: ci" finds following string but ci< and others don't.
Solution: When not inside an object find the start. (Connor Lane Smit,
closesvim/vim#8670)
b9115da4be
Problem: On a narrow screen ":hi" output is confusing.
Solution: Insert a space between highlight group name and "xxx". (Masato
Nishihaga, closesvim/vim#4599)
548be7f126
Problem: getcompletion() always passes zero as position to custom
completion function.
Solution: Pass the pattern length. (closesvim/vim#9173)
4785fe02bb
Co-authored-by: ii14 <ii14@users.noreply.github.com>
Problem: printf format not checked for semsg().
Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle,
closesvim/vim#3805)
b5443cc46d
(Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)
The current 'clamp_line_numbers' implementation modifies diagnostics in
place, which can have adverse downstream side effects. Before clamping
line numbers, make a copy of the diagnostic. This commit also merges the
'clamp_line_numbers' method into a new 'get_diagnostics' local function
which also implements the more general "get" method. The public
'vim.diagnostic.get()' API now just uses this function (without
clamping). This has the added benefit that other internal API functions
that need to use get() no longer have to go through vim.validate.
Finally, reorganize the source code a bit by grouping all of the data
structures together near the top of the file.
* fix(eval): fixup for empty modifier in fnamemodify
1dbbaf89bf
erroneously removed a check for empty modifier and a PVS fix.
Restore that check and fix.
Fixes#16367
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem: "verbose pwd" shows confusing info when :lcd does not change
directory.
Solution: Clear last_chdir_reason also when the directory does not change.
(closesvim/vim#9160)
64be6aa3a5
This only ports the tests, as this is already Nvim's behavior.
Problem: getcwd() is unclear about how 'autochdir' is used.
Solution: Update the help for getcwd(). Without any arguments always return
the actual current directory. (closesvim/vim#9142)
851c7a699a
Problem: ":verbose pwd" does not mention 'autochdir' was applied.
Solution: Remember the last chdir was done by 'autochdir'. (issue vim/vim#9142)
0526815c15
Problem: Problem with :cd when editing file in non-existent directory. (Yee
Cheng Chin)
Solution: Prepend the current directory to get the full path. (closesvim/vim#8903)
c6376c7984
Problem: Arglist test does not clear the argument list consistently.
Solution: Call Reset_arglist(). (Shougo Matsushita, closesvim/vim#9154)
3cad470385
If the quickfixlist item doesn't contain a column it is reported as 0.
Rather than using a nil value in such a case (which breaks diagnostics
elsewhere), just keep the 0 value.
Problem: Directory is wrong after executing "lcd" with win_execute().
Solution: Correct the directory when going back to the original window.
(closesvim/vim#9132)
7f13b24ab6
Problem: No event is triggered when closing a window.
Solution: Add the WinClosed event. (Naohiro Ono, closesvim/vim#9110)
23beefed73
Nvim has already implemented this feature, so this only changes tests
and docs.