Problem: build error when XCLIPBOARD is not defined
(Tony Mechelynck, after v9.2.0158)
Solution: Update ifdefs
related: #19676
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: intro message disappears on startup in some terminals
(chdiza, after v9.2.0139)
Solution: Only call set_shellsize() in handle_csi() if the reported
width or height actually differs from the current
Rows or Columns. (Foxe Chen)
fixes: #19656closes: #19660
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Crash when reading quickfix line (Kaiyu Xie)
Solution: Make sure line is terminated by NUL
closes: #19667
Supported by AI
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim could use the VisualNOS highlight group when not connected
to an X server.
Solution: Always highlight visual selections with Visual when not
connected to an X server (Shane Harper)
When Vim is running with X11 support it chooses between the Visual and
VisualNOS highlight groups for a visual selection based on whether it
believes it owns the X selection. According to :help hl-VisualNOS,
VisualNOS should only be used by the X11 GUI or when using the
xterm-clipboard feature, however, prior to this commit Vim could choose
VisualNOS when a clipboard provider was used, even when Vim was not
connected to an X server.
closes: #19659
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: concatenation can be improved
Solution: Cache string segments lengths in exe_concat() and avoid
strlen() calls (John Marriott).
closes: #19647
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Lua 5.5 makes for-loop control variables read-only.
The path-parsing logic in if_lua.c attempts to modify the
loop variable 's', causing the script to fail during
runtime initialization (Binbin Qian)
Solution: Use a Lua capture group in gmatch() to extract the path
without the semicolon, avoiding the need to re-assign
to the loop variable.
fixes: #19639closes: #19658
supported by AI
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim can only act as a channel client (ch_open). There is
no way for an external process to initiate a connection
to a running Vim instance using the Channel API.
Solution: Implement ch_listen() and the underlying server-side
socket logic. This allows Vim to listen on a port or
Unix domain socket. When a client connects, a new
channel is automatically created and passed to a
user-defined callback (Yasuhiro Matsumoto).
closes: #19231
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Problem: concatenating strings is slow
Solution: Use grow_string_tv() to grow the existing string buffer in
place when possible (Yasuhiro Matsumoto).
closes: #19642
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: blob_from_string() is slow for long strings
Solution: Use ga_grow() to allocate memory once, perform a bulk copy
with mch_memmove() then translate NL to NUL in-place
(Yasuhiro Matsumoto).
closes: #19665
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When using synchronized terminal output, the internal
output buffer is not flushed before sending the
End Synchronized Update (ESU) sequence. This causes
redrawing artifacts.
Solution: Call out_flush() immediately before sending the ESU
sequence to ensure all pending drawing commands are
contained within the synchronized update window.
(Yasuhiro Matsumoto)
closes: #19662
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: do_unlet_var() unconditionally calls dictitem_remove() in its
final else branch, but for imported items lp->ll_dict is NULL,
causing a segfault (Peter Kenny)
Solution: Add a NULL check and return E1260 instead.
Affects :unlet at vim9script level and inside legacy :function.
The :def case already worked (handled in vim9cmds.c).
fixes: #19637closes: #19657
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Compile error when FEAT_DIFF is not defined (after v9.2.0144)
Solution: Add ifdefs around those lines (John Marriott).
related: #19622
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- ftplugin(sshdconfig): use "-I" for 'keywordprg' to search
case-insensitive in the man page
- syntax(sshdconfig,sshconfig): Mark "lowdelay", "throughput", and
"reliability" as deprecated for IPQoS, highlighting them as
errors/warnings to reflect OpenSSH 10.1p1 release
Reference:
https://www.openssh.org/releasenotes.html#10.1p1closes: #19636
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Jakub Jelen <jakuje@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: blob: concatenation can be improved
Solution: Use ga_grow() to allocate space once and mch_memmove() to copy
the blob data as a single block and fall back to the previous
byte by byte append (Yasuhiro Matsumoto).
closes: #19645
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: dictionary lookups can be improved
Solution: Replace the vim_strncpy() by mch_memmove() call.
(Yasuhiro Matsumoto).
closes: #19646
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim often calls utf_ptr2char() and utf_ptr2len() separately.
Solution: Refactor UTF-8 hot paths into utf_ptr2char_and_len() to
decode the codepoint and byte length in a single pass.
Fold combining character logic into the same optimized flow.
Improves redraw performance by ~8-10% in UTF-8 heavy
scenarios (Yasuhiro Matsumoto).
closes: #19649
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: 'statuslineopt' is a global only option and configuring the
line height is limited.
Solution: Make 'statuslineopt' global-local to a window and allow to
configure a fixed-height height statusline per window
(Hirohito Higashi).
closes: #19622
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: termdebug :Break does not support `thread` and `if` arguments
Solution: extend :Break and :Tbreak to accept optional location, thread
{nr}, and if {expr} arguments (Yinzuo Jiang).
closes: #19613
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: :perl ex commands allowed in restricted mode (pyllyukko)
Solution: Add EX_RESTRICT flag to :perldo/:perl command definition.
closes: #19653
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Reading large files is slow because UTF-8 validation and
newline scanning are performed byte-by-byte. Initial file
loading also triggers listener and channel processing.
Solution: Use memchr() for SIMD-optimized newline scanning, implement
word-at-a-time ASCII skipping during UTF-8 validation using a
bitmask, skip listener/netbeans/channel notifications
when the ML_APPEND_NEW flag is set during readfile()
(Yasuhiro Matsumoto).
closes: #19612
Co-authored-by: NRK <nrk@disroot.org>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Improve the performance of all pythonNumber patterns by unrolling
digit/underscore sequence loops.
- Split the float literal pattern into two simpler patterns.
fixes: #19625 (Reported by James McCoy)
closes: #19630
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: winhighlight option handling can be improved
(after: v9.2.0093)
Solution: Check entire override stack in update_highlight_overrides();
update w_hl of every window in highlight_changed() (Foxe Chen).
closes: #19633
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- remove `set isk+=-` to highlight `-=` operator correctly
- implement highlighting of GID
- fix highlight of hostname and add special value ALL
- fix highlight of IP address
- update include and includedir patterns
- remove duplicate syntax rules
- add missing options
- fix highlight of parameter assignment (limit operators to list
parameters)
- fix highlight of string and list parameters with trailing whitespaces
- implement highlight of permission (octal)
- implement highlight of floating point numbers
- implement highlight of timeout-specific options
- support highlight of negatable options (integer, mode, float, timeout,
string)
- allow sudoersListParameter to be negated
- fix highlight of comma-separated parameter list used as boolean
- fix highlight of parameter negation (prevent highlighting ill-formed `! !`)
- fix highlight of Tag_Spec
- allow empty Runas spec: `()` and `(:)`
- fix highlight of comma-concatenated commands, hosts, and users
- check word boundaries for special value ALL
- implement highlight of Option_Spec
- fix highlight in User_Spec (specifically for Host position)
- fix highlight of `Default!` command
- support highlight of digests (sha224, etc.)
- add syntax test and update header
closes: #19634
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Using a composing character as the end of a range inside a
collection may corrupt the NFA postfix stack
(Nathan Mills, after v9.1.0011)
Solution: When a character is used as the endpoint of a range, do not emit
its composing characters separately. Range handling only uses
the base codepoint.
supported by AI
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-9phh-423r-778r
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: With zsh, executing :!nohup xdg-open url >/dev/null 2>&1 &
does not launch the browser. This occurs presumably because
gvim/zsh cleans up background processes in a non-interactive
session too quickly.
Solution: Use job_start() with "stoponexit" set to an empty string.
This bypasses the shell entirely (fixing the zsh issue)
and ensures the browser process is not killed when Vim exits.
On Linux, shellescape() is removed as job_start() in list
mode handles special characters natively.
fixes: #19594
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: memory leak in socket_server_send_reply() in src/os_unix.c
Solution: Free final in the error case when returning early
(Huihui Huang).
closes: #19627
Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_recover_corrupted_swap_file1 fails on big-ending
systems (after v9.2.0077)
Solution: Skip the test on big-endian systems (James McCoy)
The POC files were generated on 64-bit little-endian systems and
therefore are not portable to any other system type.
Extract the 64-bit / endianness detection from
Test_recover_corrupted_swap_file() into a SetUp() function and use that
data to determine if the test should be run.
closes: #19620
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Potential buffer overflow in regdump()
Solution: Add the size to the compiled regular expression and ensure we
don't read over the limit.
Note: this is not a security issue, because regdump() is typically not
compiled in any version of Vim, so should not affect anybody.
supported by AI claude.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: :tab accepts a tab address range but doesn't specify this in
the command specification.
Solution: Add EX_RANGE and EX_ZEROR to the command specification and use
ADDR_TABS (Doug Kearns).
As command modifers are handled separately before these flags are tested
in the ex-command parser they have no effect. However, it's better to
use an accurate description and the command specification table has uses
in other areas like runtime file generation for the Vim filetype.
closes: #19100
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Wayland: using _Boolean instead of bool type
Solution: Change type of variable (Christoffer Aasted).
related: #19473
closes: #19610
Signed-off-by: Christoffer Aasted <dezzadk@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a terminal window, line('w0') and line('w$') return wrong
values instead of the first and last visible line number,
because a terminal buffer does not go through the normal
redraw path that updates w_topline and w_botline (ubaldot).
Solution: Before computing w0 and w$, sync the terminal contents to the
buffer by calling may_move_terminal_to_buffer() so that
w_topline and w_botline are correctly updated.
fixes: #19585closes: #19615
supported by AI claude.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: String handling can be improved
Solution: Pass string length where it is known to avoid strlen() calls,
do a few minor refactors (John Marriott).
This commit changes some calls to function `set_vim_var_string()` to pass
the string length where it is known or can be easily calculated.
In addition:
In `evalvars.c`:
* In function `set_reg_var()` turn variable `regname` into a C string
because that is how it used.
* Small cosmetics.
In `option.c`:
* Slightly refactor function `apply_optionset_autocmd()` to move some
variables closer to where they are used.
In `getchar.c`:
* Slightly refactor function `do_key_input_pre()`:
-> change call to `dict_add_string()` to `dict_add_string_len()` and
pass it the length of `buf`.
-> only call `get_vim_var_string()` once.
In `message.c`:
* Use a `string_T` to store local variable `p`.
In `normal.c`:
* Move some variables closer to where they are used.
closes: #19618
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Just to fix some phrases:
- "A Vim clone". Neovim document says that it is not a clone, but just a
fork https://neovim.io/doc/user/nvim/#nvim
- "Supports a remote GUI". Neovim supports any UI (both GUI and TUI)
that implements its UI protocol, so "a" is not correct
- "Integration with scripting languages". This is true, but it is also
true to Vim (which supports 8 scripting languages AFAIK), so this
probably doesn't need to be said in this document. Instead, what makes
Neovim unique in this "scripting languages" aspect is its first class
support for Lua.
closes: #19605
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_textformat.vim leaves swapfiles behind
Solution: Close open buffer using :bw! instead of :close!
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: With auto paragraph formatting enabled, when a user makes an
attempt to add a new word before the end of a line and with
the following space bringing the line width over 'textwidth',
the space ends up just getting swallowed by the editor.
Solution: Detect such a constellation and do not auto-format in that
case (Daniel Müller).
closes: #19593
Signed-off-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: GTK: gdk_pixbuf_new_from_xpm_data() is deprecated since
2.44.5, causing build warnings
Solution: Replace XPM icon loading with PNG byte arrays loaded via
g_memory_input_stream_new_from_data() and
gdk_pixbuf_new_from_stream(). These APIs are available since
GLib 2.12 and gdk-pixbuf 2.14 (around 2008) so should be safe
to use today.
fixes: #19446closes: #19583
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>