Problem: cscope: can escape from restricted mode (pyllyukko)
Solution: Disallow :cscope in restricted mode (like :grep),
add a tests for restricted mode using :grep and :cscope
closes: #19731
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: textprop: negative IDs and can cause a crash without "text"
(Paul Ollis)
Solution: Strictly reserve negative IDs for virtual text, ignore "id"
when "text" is provided in prop_add() (Hirohito Higashi).
When prop_add() was called with a negative id and no "text", the
property was stored with a negative tp_id. A subsequent call to
prop_list() or screen redraw would then treat it as a virtual text
property and dereference b_textprop_text.ga_data, which is NULL when
no virtual text properties exist.
Negative ids are reserved for virtual text properties, so always
reject them with E1293 regardless of whether virtual text properties
exist. Also, when "text" is specified any user-provided id is now
silently ignored and an internal negative id is assigned.
Remove the now-unnecessary did_use_negative_pop_id flag and E1339.
Update E1293's message and the documentation accordingly.
related: #19684
closes: #19741
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The "android" and "termux" feature flags have been shipped in
Termux's downstream vim / vim-gtk package for 5+ years but were
never properly documented in the downstream patch.
Solution: Upstream the "android" and "termux" feature flags into Vim as
decoupled feature flags, this enables the "android" feature in
particular to be available independently of the "termux"
feature for builds of Vim against the Android NDK, but not
including the Termux NDK patchset.
closes: #19623
Co-authored-by: Lethal Lisa <43791059+lethal-lisa@users.noreply.github.com>
Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
Signed-off-by: TomIO <tom@termux.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When 'diffopt' does not include "internal", Vim attempts to
execute an external diff command even in restricted mode.
This could be used to bypass restricted mode.
Solution: Call check_restricted() in diff_file() before attempting to
execute an external diff (pyllyukko).
closes: #19696
Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When using 'diffopt=inline:word', lines were excessively
fragmented with punctuation creating separate highlight
blocks, making it harder to read the diffs.
Solution: Added 'diff_refine_inline_word_highlight()' to merge
adjacent diff blocks that are separated by small gaps of
non-word characters (up to 5 bytes by default) (HarshK97).
When using inline:word diff mode, adjacent changed words separated by
punctuation or whitespace are now merged into a single highlight block
if the gap between them contains fewer than 5 non-word characters.
This creates more readable diffs and closely matches GitHub's own diff
display.
closes: #19098
Signed-off-by: HarshK97 <harshkapse1234@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
When system() or systemlist() is called without :silent from a
statusline expression, autocommand, or timer callback, the terminal
is temporarily set to cooked mode, which re-enables ECHO on the tty.
If a terminal response (e.g. DECRPM for cursor blink mode) arrives
during this window, the tty driver echoes it to the screen, leaving
stray characters that require CTRL-L to remove.
This behavior was intentionally addressed in patch 7.4.427 by
skipping cooked mode when :silent is prepended. However, the
documentation only mentioned this for system() and did not cover
systemlist() at all. The guidance to use :silent in non-interactive
contexts (statusline, autocommands, timers) was also not explicit.
closes#19691
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
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: '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>
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: Vim still supports compiling on NeXTSTEP
Solution: Drop Support (Damien Lejay)
The NeXTSTEP operating system has been obsolete for decades. The
special-case code required to support it adds unnecessary complexity,
preprocessor conditionals, and non-standard workarounds to the codebase.
This commit removes all support for NeXTSTEP, simplifying the code and
build system in several ways:
- Replaced custom configure checks for `union wait` with a standard `AC_CHECK_FUNCS` call for `waitpid`.
- Removed all conditional code that used the non-standard `union wait` for process status, relying solely on a standard `int`.
- Replaced calls to the non-standard `wait4()` function with the POSIX-standard `waitpid()`.
- Cleaned up headers (`os_unix.h`, `os_unixx.h`) to remove NeXT-specific workarounds and macros.
- Removed obsolete NeXT compilation instructions from the INSTALL file.
This change improves maintainability and makes the Unix process handling code more linear and compliant with modern POSIX standards.
related: #18079
closes: #19582
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: No support for terminal synchronization mode
Solution: Add DEC 2026 support using the 'termsync' option
(Foxe Chen).
related: #11718
closes: #19541
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Not possible to have window-local highlighting groups
(Hima)
Solution: Port Neovims 'winhighlight' option to Vim (Foxe Chen).
fixes: #3576closes: #19493
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: cannot display tabs for indentation
Solution: Add the "leadtab" value to the 'listchars' option to
distinguish between tabs used for indentation and tabs used
for alignment (HarshK97).
closes: #19094
Signed-off-by: HarshK97 <harshkapse1234@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Cannot have a mutli-line statusline.
Solution: Add support for multi-line statusline
(Hirohito Higashi).
closes: #19123
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Not possible to know when a session will be loaded.
Solution: Add the SessionLoadPre autocommand (Colin Kennedy).
fixes: #19084closes: #19306
Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: No support for the DAP channel mode
Solution: Add native channel support for the debug-adapter-protocol
(Foxe Chen)
closes: #19432
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The 'previewpopup' option lacks several customization values
that 'completepopup' supports, such as borders, shadows,
and UI handles.
Solution: Add support for "border", "borderhighlight", "close",
"resize", and "shadow" to 'previewpopup' (Arkissa)
closes: #18873
Signed-off-by: Arkissa <mrarkssac@gmail.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: ConPTY not yet preferred
Solution: Mark ConPTY as stable starting with Windows 11 (build 22000).
Vim will now prefer ConPTY over winpty on these systems.
fixes: #19033closes: #19037
Signed-off-by: bennyyip <yebenmy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When ch_open() tries to connect to a hostname that resolves to
multiple addresses (e.g., both IPv6 and IPv4), it uses a
single waittime for all connection attempts. If the first IPv6
connection attempt times out, it consumes almost all of the
waittime, leaving insufficient time (often just 1ms) for the
IPv4 attempt to succeed. (reporter)
Solution: Implement a simplified version of Happy Eyeballs (RFC 8305) to
improve connection fallback behavior when IPv6 is unavailable
or slow (thinca).
Distribute the waittime across multiple addresses:
- First address: use up to 250ms (RFC 8305 Connection Attempt Delay) or
half of the total waittime, whichever is smaller
- Middle addresses: divide remaining time equally
- Last address: use all remaining time
This ensures that IPv4 fallback has sufficient time to succeed even when
IPv6 connection attempts fail or timeout.
closes: #19233
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Hard to configure Vim according to full XDG spec
Solution: Include the $VIMRUNTIME/xdg.vim script as an example.
(Andrey Butirsky).
closes: #19421
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: popup: Popup windows do not support a transparency setting.
Solution: Add the "opacity" option to popup windows to support
transparency when using the GUI or 'termguicolors'
(Yasuhiro Matsumoto).
closes: #19272
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Stop mentioning "home directory" in the rtp search locations 1. and 5.,
which is incorrect in case of XDG scheme. $MYVIMDIR is correct, so use
this instead.
closes: #19438
Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Use ellipses, matching the file's general style, rather than hard
truncation of overlength tail comments in examples.
closes: #19298
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
In particular, also mention the difference between the regex atom \k and
what Vim considers for a word character.
closes: #18688
Signed-off-by: Christian Brabandt <cb@256bit.org>