Problem: Crash when closing a split window if autocmds close other
split windows but there are still floating windows.
Solution: Bail out and give the window back its buffer.
In close_buffer(), free_buffer() is called to remove the buffer from
buffer_handles immediately after removing it from the buffer list, so as
long as a buffer is in buffer_handles it is always valid.
Problem: Crash when a terminal receives OSC 2 just after closing its
buffer but before terminal job exits.
Solution: Remove FUNC_ATTR_NONNULL_ALL from buf_set_term_title() and
check for NULL.
Problem
LSP Related Information line and column numbers are 0-based. Displaying
them this way can confuse the user, since vim line/col numbers are
typically displayed 1-based.
Solution
Display the line and column numbers as 1-based.
Problem: Destroying a terminal with pending TermRequest leads to
heap-use-after-free when processing TermRequest afterwards.
Solution: Store the buffer handle instead of the Terminal pointer in the
pending TermRequest event, and don't emit TermRequest if the
terminal is already closed.
Problem: null pointer member access when closing the only non-float in the
current tab page if autocommands after closing all floats also close all other
tab pages. (making it the last window)
Solution: check last_window again after closing the floats.
Also reduce the scope of "wp"; it would be bugprone to use it before it's later
reassigned to the rv of win_free_mem if freed by Buf/WinLeave.
Problem: tests: Test_cd_completion() may fail depending on the contents
of the root directory of the current drive on Windows.
readdir() may return a directory that cannot "cd" to, causing
this test to fail. An example of such a directory is
"System Volume Information" which only admin can "cd" to.
Solution: When determining the directory to use for testing, use the
directory that we actually "cd" to successfully.
In addition, directories with '$' in their names are also
excluded, as they are considered environment variables during
completion and do not work as expected.
Example: "$RECYCLE.BIN" (Muraoka Taro).
closes: vim/vim#190786625ba359e
Co-authored-by: Muraoka Taro <koron.kaoriya@gmail.com>
* fix(vim-patch): test_codestyle.vim is NA
Neovim has make lint, specifically clint.lua.
Unless vim9jit, https://github.com/tjdevries/vim9jit, or similar tool
compiles vim9 "test" code into lua, it's futile to port it.
* fix(vim-patch): NA files from dev_vimpatch.txt
- channel
- json
- job
- term
- terminal
Nvim has its own incompatible implementation or uses 3rd-party
libraries (ie. libuv, libtermkey).
* fix(vim-patch): term.c is applicable for replace_termcodes()
* fix(vim-patch/na): blowfish,dlldata,iid_ole,nbdebug,os_w32
blowfish is for encryption.
dlldata,iid_ole,os_w32 are for Windows (GUI, registry, entry point).
Nvim doesn't need them to be installed on Windows.
nbdebug.[ch] is for Netbeans Debugging Tools.
They're N/A.
* fix(vim-patch): runtime/
Nvim has its own documentation for development
- runtime/doc/debug.txt
- runtime/doc/develop.txt
N/A since the beginning:
- runtime/doc/os_haiku.txt
- runtime/doc/pi_logipat.txt
- runtime/doc/quotes.txt
- runtime/plugin/logiPat.vim
- runtime/plugin/manpager.vim
- runtime/tools/demoserver.py
- runtime/spell/.*\.latin1
Vim9 is N/A.
- runtime/doc/os_haiku.txt
* fix(vim-patch): src/
win32yank replaces "src/winclip.c".
Vim's desktop files are N/A.
Nvim removed 'termencoding'.
Nvim doesn't use Vim's lsan-suppress.txt to configures LSAN.
Add documentation notes explaining that visual marks '< and '> have
different behaviors in getpos() and setpos().
Also fix a small typo.
closes: vim/vim#1907093eb081eee
Co-authored-by: Larson, Eric <numeric.larson@gmail.com>
Problem: When switching to another terminal buffer in Terminal mode,
usually Nvim stays in Terminal mode, but leaves Terminal mode
if the old terminal buffer was deleted.
Solution: Don't always leave Terminal mode when active terminal buffer
is deleted. Instead let terminal_check_focus() decide that.
Problem: Inefficient use of ga_concat()
Solution: Use ga_concat_len() when the length is already known to avoid
use of strlen() (John Marriott).
Additionally the following changes are done:
os_unix.c:
- in function `socket_server_list_sockets()` use a `string_T` for the
strings `buf` and `path` for use in `ga_concat_len()`
and drop un-needed variable `dir`.
quickfix.c:
- in function `qf_jump_print_msg()` use a `string_T` for the string
`IObuff` for use in `ga_concat_len()`.
- in function `qf_range_text()` use a `string_T` for the string `buf`
for use in `ga_concat_len()`.
register.c:
- simplify function `execreg_line_continuation()`.
terminal.c:
- in function `read_dump_file()` use a `string_T` for the
string `prev_char` for use in `ga_concat_len()`.
tuple.c:
- in function `tuple_join_inner()` use a `string_T` for the
string `s` for use in `ga_concat_len()`. Also, change local struct
`join_T` to use `string_T`.
vim9type.c:
- in functions `type_name_tuple()` and `type_name_func()`
use a `string_T` for the string `arg_type` for use in
`ga_concat_len()`.
closes: vim/vim#19038a7e671fbb9
Skip tuple.
Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: :tlnumenu incorrectly accepts a range.
Solution: Remove EX_RANGE and EX_ZEROR from the command definition and
use ADDR_NONE (Doug Kearns).
closes: vim/vim#1905519442ad118
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: tests: test_menu.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!
7f5c60b31e
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_marks.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!
4fe7301df9
Co-authored-by: Christian Brabandt <cb@256bit.org>
With `overlap=true`, more extmarks than the requested limit may be
collected in `extmark_get`. This then leads to an out of bounds write of
`rv` in `nvim_buf_get_extmarks`.
Problem:
`:lsp restart` detects when a client has exited by using the `LspDetach`
autocommand. This works correctly in common cases, but breaks when
restarting a client which is not attached to any buffer. It also breaks
if a client is detached in between `:lsp restart` and the actual
stopping of the client.
Solution:
Move restart logic into `vim/lsp/client.lua`, so it can hook in to
`_on_exit()`. The public `on_exit` callback cannot be used for this, as
`:lsp restart` needs to ensure the restart only happens once, even if
the command is run multiple times on the same client.
Problem: The function get_logical_pos did not account for the possibility that a diagnostic might not have an associated extmark, leading to potential errors or incorrect behavior.
Solution: Add a check for diagnostic._extmark_id and return the logical positions directly if it does not exist.
Work on #37166
- Dynamic Registration Tracking via Provider
- Supports_Method
- Multiple Registrations
- RegistrationOptions may dictate support for a method
vim-patch:9.0.0993: display errors when adding or removing text property type
vim-patch:7a6d9454c README.md: remove the warp ad again
vim-patch:9.1.2032: Vim9: error when using class member in Lambda
vim-patch:9.1.2036: if_ruby: build error with ruby 4.0
Problem: No test that undofile format does not regress
Solution: include a sample undofile to make sure we are always able to
read it
This is so, that we don't unintentionally change the undofile format and
make sure we can load an undo file that has been created by an older
Vim.
closes: vim/vim#1612714382c8bc9
Convert the undo file in samples/ using method from #13973.
Co-authored-by: Christian Brabandt <cb@256bit.org>
This reverts commits:
- 6b652a785033fd4164e049492a7327c1ed7c3e5f
- 2f689d5abde0ccddca9e20d8c93a0299bd054e32
- a025a46d4169587145fb54f04af349cd05cb6122
Several email addresses that are known to be valid caused bounces
due to an issue with my email setup. The previous commits incorrectly
marked these addresses as invalid. So revert the whole thing again.
62d8f3dab5
N/A patch:
vim-patch:2f689d5: runtime: mark more invalid email addresses
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Cursor displayed in wrong position after deleting line.
Solution: When deleting lines do not approximate botline. (fixesvim/vim#8559)
5bea41dea3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
When the `#offset!` directive is used with `:EditQuery`, the query does not take the offset into consideration when creating the extmark to preview the capture.
Solution:
Use the capture metadata to modify the node range before creating the extmark.