patch 9.2.0875: GTK4: GUI does not support command-line arguments
Problem: The GTK4 GUI does not support command-line arguments
Solution: Parse the supported GUI arguments in gui_mch_prepare()
and add the GTK4-specific --prg-name argument (Foxe Chen).
closes: #20847
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Igor Mikushkin [Wed, 29 Jul 2026 18:53:08 +0000 (18:53 +0000)]
patch 9.2.0874: fold size is compared against 'foldminlines' of the wrong window
Problem: checkSmall() compares the fold size of window "wp" against
the current window's 'foldminlines'. A fold of another
window, e.g. measured while it is redrawn, is judged by an
unrelated option value.
Solution: Use 'foldminlines' of the window containing the fold
(Igor Mikushkin).
closes: #20864
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Igor Mikushkin <igor.mikushkin@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0873: :redrawstatus does not update the ruler of the last window
Problem: When the last window has no status line the ruler takes its
place in the last screen line, but ":redrawstatus" and
re-setting 'rulerformat' or 'statusline' do not update it
there. An item such as a clock in 'rulerformat' can therefore
not be refreshed from a timer (watael)
Solution: Also mark the ruler for redrawing when the last window has no
status line and 'ruler' is set. Update the documentation,
tests and add a new test (Hirohito Higashi)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0872: popup with opacity does not use the font of the highlight group
Problem: When a popup window has an opacity between 0 and 99 the "font"
item of its highlight group is ignored and the regular font is
used instead. The same applies to "ctermfont", and to the
popup menu when the "opacity:" value of 'pumopt' is used
(Salman Halim).
Solution: Also take the font from the popup highlight when blending the
cell attributes (Hirohito Higashi)
fixes: #20551
closes: #20866
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(doc): GTK: document that "font" in a highlight group has no effect
Problem: It is not documented that in the GTK GUI the "font" item of a
highlight group only works for the "Normal" group. The example
even uses another group, so it does not work there.
Solution: Mention the restriction and use the "Normal" group in the
example.
closes: #20867
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The documentation says the width of a popup window is equal to
the longest visible line, while since 9.2.0419 it is the
longest line in the buffer, also when that line is not
displayed.
Solution: Update the documentation and correct a comment that says
otherwise.
patch 9.2.0871: screen line is lost when splitting a 'winfixheight' window
Problem: When the only window has 'winfixheight' set and 'laststatus'
is one, splitting it leaves one screen line unused. This
happens for example when jumping to an item from a maximized
quickfix window (rendcrx)
Solution: Do not subtract the height of the status line twice
(Hirohito Higashi)
fixes: #20495
closes: #20871
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(doc): Vim9: dictionary in a lambda block is not documented
Problem: It is not documented that inside a lambda block the closing "}"
of a dictionary must not be at the start of a line. The note
is only given for a command block, while the restriction is the
same.
Solution: Mention it at |inline-function| and refer to |command-block|.
closes: #20872
fixes: #20693
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Brian Carbone [Tue, 28 Jul 2026 19:03:49 +0000 (19:03 +0000)]
patch 9.2.0870: filetype: marko files are not recognized
Problem: filetype: marko files are not recognized
Solution: Detect *.marko files as marko filetype, include a syntax
plugin and add syntax tests (Brian Carbone)
patch 9.2.0869: buf_copy_options() can lose the P_INSECURE flag
Problem: An insecurely-set 'indentexpr', 'formatexpr', 'includeexpr'
or 'complete' value can end up evaluated outside the
sandbox after buf_copy_options() and clears the flag.
Solution: Copy the insecure flag alongside the value in
buf_copy_options(), and make 'complete' a per-buffer
insecure-flags field
patch 9.2.0868: GTK: Window Manager hint prevents giving focus to dialog
Problem: GTK: Window Manager hint prevents giving focus to dialog
(Allen Wild, after v9.1.0881)
Solution: Remove Window Manager hint again (Christoffer Aasted)
related: #16100
fixes: #17760
closes: #20727
Signed-off-by: Christoffer Aasted <dezzadk@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0867: MS-Windows: messages are not in the display language
Problem: On MS-Windows the messages use the language of the regional
format, not the language that Windows is displayed in
(Markus Nißl)
Solution: Use the display language for the messages, with the other
preferred languages as fall back. Make ":language messages"
overrule it (Hirohito Higashi).
fixes: #20855
closes: #20860
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0866: MS-Windows: ":language messages" only works once
Problem: On MS-Windows ":language messages" has no effect once messages
have been translated, the previous language keeps being used.
Solution: Make gettext drop the translations it cached.
related: #18622
closes: #20862
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0865: GTK4: non-hardware accelerated UI is too slow
Problem: GTK4: non-hardware accelerated UI is too slow
Solution: Remove the sofware rendering (cairo) backend, make the GTK4
hardware accelerated rendering the default (Foxe Chen).
closes: #20844
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0864: Using some dead code in Wayland feature
Problem: Using some dead code in Wayland feature
Solution: Cleanup configure check and remove HAVE_SHM_OPEN test, remove
mch_open_anon_file(), Show result "no" when disabling Wayland
via configure, regenerate auto/configure (Foxe Chen)
closes: #20859
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0863: MS-Windows GUI: window contents can be missing when VimEnter is slow
Problem: On MS-Windows the text area can stay undrawn while a slow VimEnter
autocommand runs, so the window shows what was on the screen behind
it. Whether this happens depends on when the first paint message
arrives.
Solution: Draw the text area when the window is opened, instead of waiting for
the message loop.
related: #20807
closes: #20858
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0861: GTK4: bleed region updates in jumps
Problem: In the GTK4 GUI (GtkSnapshot) the bleed region is only
repainted when the text grid changes by a whole cell,
so during a resize it updates in jumps of several pixels
instead of following the window edge smoothly.
Solution: Redraw the draw area whenever the bleed values change
(Foxe Chen).
closes: #20851
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jon Parise [Sun, 26 Jul 2026 15:20:02 +0000 (15:20 +0000)]
runtime(python): highlight the 'lazy' soft keyword
Lazy imports (PEP 810, to be released in Python 3.15) introduces a
`lazy` soft keyword that's recognized when it precedes a `from` or
`import` keyword.
closes: #20342
Signed-off-by: Jon Parise <jon@indelible.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0858: MS-Windows GUI: white flash when VimEnter is slow
Problem: In the MS-Windows GUI the window is shown before the screen is
drawn for the first time. Until then it displays undefined
content, which appears as a white flash when a VimEnter
autocommand delays the first redraw.
Solution: Use the background color for the window as long as the screen
contents are not available, and paint it again when the
background color changes while only that color is shown.
fixes: #20757
closes: #20807
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0857: popup: opacity popup over a terminal is not cleared when closed
Problem: A semi-transparent (opacity) popup shown over a terminal window
leaves its old cells on screen when it is closed.
Solution: When a semi-transparent popup is closed, trigger full redraw
of underlying terminal windows.
fixes: #20846
closes: #20848
Signed-off-by: mityu <mityu.mail@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(python): Fix indenting for brackets within python byte strings
Problem: s:SearchBracket()'s skip-expression matches syntax group
names ending in "Comment", "Todo", or "String" to decide
whether a candidate bracket is inside a string/comment
and should be skipped for indentation purposes. Byte and
raw-byte string literals (b"...", rb"...") are highlighted
via the pythonBytes/pythonRawBytes syntax groups, which
don't end in "String", so brackets inside them (e.g.
b"[") were never skipped and were counted as real,
unmatched brackets, producing incorrect indentation.
Solution: Add "Bytes" to the indent script's existing suffix match,
so pythonBytes/pythonRawBytes are recognized directly, the
same way pythonString/pythonFString/pythonRawString
already are.
This supersedes an earlier version of this fix that
renamed pythonBytes/pythonRawBytes to
pythonBytesString/pythonRawBytesString in
runtime/syntax/python.vim.
fixes: #20812
closes: #20827
Signed-off-by: qwavies <qwavsbusiness@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0856: GTK4: undercurl rendering is inefficient
Problem: In the GTK4 GUI the undercurl is drawn by building a path
across the whole width of each decorated row. With many
undercurls on screen this causes frame drops.
Solution: Render a single cycle of the undercurl and tile it across the
row with a repeating node, so the Vulkan and OpenGL
renderers can repeat directly (Foxe Chen).
closes: #20829
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
CI: Bump the github-actions group across 1 directory with 3 updates
Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [actions/labeler](https://github.com/actions/labeler).
Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v7.0.0...v7.0.1)
Updates `github/codeql-action` from 4.37.0 to 4.37.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.37.0...v4.37.1)
Updates `actions/labeler` from 6.2.0 to 7.0.0
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v6.2.0...v7.0.0)
patch 9.2.0855: 'showcmd' not redrawn with empty mapping triggered on timeout
Problem: 'showcmd' not redrawn with empty mapping triggered on timeout.
Solution: Don't postpone redraw when inside vgetorpeek(). Also move test
for tabline 'showcmd' to test_tabline.vim.
fixes: #20839
closes: #20840
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0854: memory leak when reading a spell file with SN_SAL and SN_SOFO
Problem: Memory leak when a spell file has an SN_SAL section before an
SN_SOFO section: set_sofo() reuses sl_sal without freeing the
salitem_T entries left by read_sal_section() (after v9.2.0846).
Solution: Factor the SAL free loop into free_sal_items() and call it
before set_sofo() reuses sl_sal.
Problem: Focus autocommands triggered inconsistently
Solution: Suppress dialog-generated focus events while a dialog is
active and on X11 ignore the restoring focus_in_event()
from closing a dialog (Christoffer Aasted).
closes: #20780
Signed-off-by: Christoffer Aasted <dezzadk@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0850: MS-Windows: commands from a client can be lost
Problem: On MS-Windows commands sent by a client in quick succession,
e.g. repeated "--remote-tab", can be lost: the files are not
all opened (eight)
Solution: In the GUI the client message is handled re-entrantly, e.g.
while a command line is being read during a redraw. Inserting
the received keys into the typeahead buffer then corrupts it.
Postpone inserting the keys until a safe point where the
typeahead buffer is empty (Hirohito Higashi).
fixes: #20810
closes: #20816
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0848: tagfunc "cmd" with a generic Ex command corrupts the tag entry
Problem: When a tagfunc returns a "cmd" that is neither a line number nor
a search pattern, the tag entry is corrupted: the "kind" field is
lost and taglist() returns a mangled "cmd".
Solution: Accept any Ex command in "cmd" as in a tags file, terminate a
generic command with a bar so the trailing fields are preserved,
and reject a value that cannot be stored in a tag line with E987
(Hirohito Higashi).
fixes: #20781
related: #20790
closes: #20828
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-Authored-By: Mao-Yining <mao.yining@outlook.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Update the Go syntax file with some recent changes made to vim-go to
correctly highlight the second and later lines of concatenated strings
in var or const blocks.
closes: #20835
Signed-off-by: Billie Cleek <bhcleek@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
A crafted spell file with an empty SN_SAL section before an SN_SOFO
section reaches set_sofo() with sl_sal_first[] already set to -1 by
set_sal_first(). The counting loop then under-counts colliding
multi-byte "from" characters, allocates an undersized list and writes
past its end.
patch 9.2.0845: [security]: arbitrary Ex command execution during C omni-completion
Problem: [security]: arbitrary Ex command execution during C
omni-completion (Threonine)
Solution: Match tags typeref literally to block Ex command injection
(Yasuhiro Matsumoto).
Escaping only "/" and "\" left the typeref able to break out of the
:vimgrep pattern without a "/": an unclosed "[" makes vimgrep's pattern
skipping fail, and the parser then treats a following "|" as a command
separator, so the tag value runs as Ex commands during C omni-completion.
Match the field literally with \V so no regex metacharacter can affect
pattern parsing.
patch 9.2.0844: [security]: use-after-free on json decode error
Problem: [security]: use-after-free on json decode error
(@tdjackey)
Solution: Report the position from the current reader
(Matsumoto Yasuhiro)
json_decode_item() caches "p" into js_buf, but json_decode_string() can
refill via channel_fill(), which frees the old js_buf. When the string
parse then fails (e.g. an invalid \u escape), the shared error path passed
the now-dangling "p" to semsg(), a heap use-after-free read reachable
pre-auth through the socketserver.
patch 9.2.0843: [security]: popup: opacity mask indexed out of bounds
Problem: [security]: A "clipwindow" popup with "opacity" anchored to a
text property can keep a negative window row when the anchor
scrolls above the top of the host window. The opacity mask
loop then indexes the screen array before its start, causing
an out-of-bounds read and a conditional out-of-bounds write
(tdjackey).
Solution: Keep the popup window row at the first visible row and record
the clipped-off top rows only in the top offset, so no
consumer has to clamp the row and the opacity mask loop stays
in bounds (Hirohito Higashi).
patch 9.2.0841: [security]: heap overflow when adding > 65535 text properties
Problem: [security]: heap overflow when adding > 65535 text properties
(Wang1rrr).
Solution: Verify that the number of text properties falls within the
limit (Yasuhiro Matsumoto).
patch 9.2.0840: [security]: code injection in netrw via bookmarks
Problem: [security]: code injection in netrw via bookmarks and history
(David Carliez)
Solution: Escape the '|' explicitly (Yasuhiro Matsumoto)
The bookmark and history menu builders interpolate paths into :execute'd
:menu commands using g:netrw_menu_escape, which did not escape the Ex
command separator '|'. A crafted path could break out of the :menu command
and run arbitrary Ex/shell commands when the menu was built or triggered.
Add '|' to g:netrw_menu_escape for the menu names, escape the :e right-hand
side with fnameescape(), and quote the netrw#MakeTgt() argument with
string() instead of raw single-quote interpolation.
patch 9.2.0839: [security]: arbitrary code execution via keyword lookup
Problem: [security]: arbitrary code execution via keyword lookup in
sh.vim, zsh.vim and ps1.vim filetype plugin
(manus-use)
Solution: For powershell, quote the commands using single quotes, for
sh/zsh pass the argument as a separate list item to term_start()/system()
(Yasuhiro Matsumoto).
patch 9.2.0836: filetype: .git-blame-ignore-revs file is not recognized
Problem: filetype: .git-blame-ignore-revs file is not recognized
Solution: Detect .git-blame-ignore-revs file as gitrevlist filetype,
include syntax and filetype plugins (Fionn Fitzmaurice)
A Git revision list is
> a list of object names (i.e. one unabbreviated SHA-1 per line)...,
> comments (#), empty lines, and any leading and trailing whitespace are
> ignored.
(from Git's fsck.skipList documentation).
The default output of git rev-list will match this. It is also suitable
as input to git blame --ignore-revs-file.
This adds filetype detection matching .git-blame-ignore-revs files,
syntax highlighting and basic filetype settings.
closes: #20702
Signed-off-by: Fionn Fitzmaurice <fionn@github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0834: cleared last search pattern is restored from viminfo
Problem: cleared last search pattern is restored from viminfo
Solution: Do not apply the search pattern and 'hlsearch' state read
from viminfo while writing (Barrett Ruth).
fixes: #20718
closes: #20720
Signed-off-by: Barrett Ruth <br@barrettruth.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0833: GTK4: menu mnemonics do not work properly
Problem: GTK4: menu mnemonics do not work properly
Solution: Force "mnemonics-visible" back on via a notify handler and
set the active item on "mnemonic-activate" (Foxe Chen).
closes: #20722
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(netrw): fix E471 in Neovim when g:netrw_chgwin is one past the last window
Problem: Opening a file from a netrw listing throws
"E471: Argument required: keepj keepalt 2wincmd 1" when
g:netrw_chgwin equals winnr('$')+1, e.g. after opening
:Lexplore (which sets g:netrw_chgwin=2) and closing the
sidebar, then browsing with :Explore in the remaining window.
s:NetrwBrowseChgDir builds the window jump as
"g:netrw_chgwin wincmd curwin", passing the saved window
NUMBER where wincmd expects its single-letter argument.
Solution: Jump back to the saved window with "curwin wincmd w", as the
surrounding comment intends; the following statement then
performs the actual jump to g:netrw_chgwin.
The faulty line dates back to at least Vim 9.0
(runtime/autoload/netrw.vim:4976 at v9.0.0000).
Reported (against the since-archived netrw repo) in
saccarosium/netrw.vim#98 and neovim/neovim#34169.
Note: no test, because the error reproduces only in Neovim.
closes: #20741
Signed-off-by: erdivartanovich <erdivartanovich@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0832: socketserver: remote commands can be processed in reverse order
Problem: When several clients send a command in quick succession, e.g.
":drop" from repeated "--remote-tab", the commands can be
processed in reverse order, so the files open in the wrong
order.
Solution: The server inserts a newly accepted client at the head of the
client list, so pending clients are handled newest-first.
Append the client to the end of the list instead, so they are
handled in the order they were accepted (Hirohito Higashi).
closes: #20813
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Maxim Kim [Wed, 22 Jul 2026 17:22:44 +0000 (17:22 +0000)]
patch 9.2.0831: diff highlighting hard to read with syntax enabled
Problem: diff highlighting hard to read with syntax enabled and
terminals having 256 or less colors (Andrey Butirsky)
Solution: Set a cterm foreground color (Maxim Kim)
fixes: #4071
closes: #20711
Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0830: the completion menu is not used on terminals without colors
Problem: When the terminal reports no colors ("t_Co" is 0 or 1) the
insert mode completion popup menu is not shown at all, while
the command line completion popup menu ('wildoptions' contains
"pum") is shown. In 'wildmenu' completion the current match
cannot be told apart from the other matches (Maxim Kim)
Solution: Show the insert mode completion popup menu regardless of the
number of colors and add "term" attributes to the default
highlighting of Pmenu, PmenuSel and PmenuThumb. The wildmenu
is drawn with the attributes of the status line, which is
reversed, and on most terminals the standout mode is the same
as the reverse mode, thus use the underline mode for the
default highlighting of WildMenu (Hirohito Higashi).
fixes: #20800
closes: #20803
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0829: Sessions do not preserve script version for expression options
Problem: Sessions do not preserve script version for option holding
expressions
Solution: Remember script version for string options, and add a
":legacy" prefix for ":set"/":setlocal" calls when necessary
Since patch v9.2.0579 (":mksession, :mkview and :mkvimrc emit legacy Vim
script") session files are marked as Vim9 script. A few options have
Vim expressions as their values. When inserted their values literally
into a Vim9 script, these expressions are now evaluated as Vim9
expressions. But the original value might have been set by a legacy
script.
In order to be backward compatible and not break most of the existing
file type plugin scripts, we need to consider the script version of the
option value. If an option was set in a legacy script, or via "legacy
set"/"legacy setlocal", we need to restore it using the "legacy" prefix
as well.
Options are not marked as expression options, vs string options, vs bool
options. We only know if an option is a bool, number or a string
option. It seems safe to set bool and number options using Vim9
semantics. But for string options we do not know if an option value is
a Vim expression. And so, if it was set by a legacy script we just
use a conservative approach and prefix the "set" or "setlocal" command
with "legacy" for all string options set in a legacy context.
related: #20152
closes: #20696
Signed-off-by: Illia Bobyr <illia.bobyr@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0828: GTK4: hardware rendering can be improved
Problem: GTK4: hardware rendering can be improved
Solution: Refactor code (Foxe Chen)
This change does the following:
- Make each cell have its own array of glyphs, that represent it. Before
glyphs were stored per span of drawn text.
- Background color, invert blend is now stored as a single row pixel
buffer, that is scaled up to size when rendering. No need to have logic
for merging visual attributes together.
- Underlines, undercurls, and strikethroughs use a mask outline, and a
pixel buffer (similar to the above) that is opaque at parts where there
are under decorations. This means having 100 individual undercurls that
are all separated by spaces in a row will only result in a single mask
node.
- Render nodes are cached per row, because creating render nodes are
cheap. The actual heavy stuff would be shaping text into glyphs, which
are cached per cell.
- Use PangoAttrFontFeatures to handle guiligatures option, instead of
manually splitting draw calls, which is buggy and complex (some complex
unicode characters are not rendered correctly).
- Render block cursor separately, this prevents a full redraw of the text
for the row the cursor is on (only if glyphs in cell underneath cursor
did not change).
Complex unicode characters that bleed outside of the cell should look
better, since the background is always rendered before all glyphs,
meaning they are not clipped off.
fixes: #13435
closes: #20674
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0827: :startinsert enters Insert mode in a non-modifiable buffer
Problem: ":startinsert" enters Insert mode in a buffer where
'modifiable' is off, the error only appears when a character
is typed. Typing "i" gives the error right away (Barrett Ruth)
Solution: Give the error when the buffer is not modifiable, like "i"
does. Keep ignoring the command in a terminal window, where
":startinsert" is documented to be ineffective, and keep
accepting it when 'insertmode' is set, like "i" does
(Hirohito Higashi).
fixes: #20804
closes: #20806
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Maxim Kim [Wed, 22 Jul 2026 09:16:53 +0000 (09:16 +0000)]
patch 9.2.0826: highlighting for broken terminals can be improved
Problem: highlighting for broken terminals can be improved
(Maxim Kim)
Solution: Make the highlighting work better when the terminal does not
support colors (Maxim Kim)
In a colorless or broken terminal emulator current syntax highlighting
is too intense with using bold and underline for various syntax
elements.
In this scenario, when the colors are not available at all, the most
important part of the syntax is the comments, something that is not
executed or compiled.
- Comments are highlighted as bold
- All other syntax elements are set to NONE
- LineNr is not highlighted (was underline)
- SpecialKey is not highlighted (was bold)
fixes: #20712
closes: #20799
Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0825: regexp: submatch in a look-behind is empty with the NFA engine
Problem: With the NFA engine a sub-expression inside a variable width
look-behind, e.g. "\v(.)@<=", is empty for the first match on
every line except the first one. The old engine is correct
(Mukundan)
Solution: The look-behind is retried from the previous line, because the
width of "." is over-estimated. While scanning that line the
start state is added at the end of the line, where it gets the
position of the line break as its start position, even though
the match actually starts on the next line. Use the position
of the start of the next line in that case (Hirohito Higashi).
fixes: #20802
closes: #20805
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
James McCoy [Tue, 21 Jul 2026 16:28:59 +0000 (16:28 +0000)]
patch 9.2.0823: tests: Test_clientserver_servlist_list may fail
Problem: tests: Test_clientserver_servlist_list may fail
Solution: Skip Test_clientserver_serverlist_list for non-gvim GUI builds
(James McCoy)
Running a GUI build that cannot access the GUI clientserver will fail
like below
command line..script /build/package/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_clientserver_serverlist_list[16]..WaitForAssert[2]..<SNR>4_WaitForCommon[11]..<lambda>23 line 1: Pattern 'XVIMTEST' does not match ''
command line..script /build/package/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_clientserver_serverlist_list line 18: Expected 'list<string>' but got 'string'
Caught exception in Test_clientserver_serverlist_list(): Vim(call):E897: List or Blob required @ command line..script /build/package/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_clientserver_serverlist_list, line 19
closes: #20719
Signed-off-by: James McCoy <jamessan@debian.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0820: GUI: hidden popup image is displayed and not erased
Problem: In the GUI a popup image is drawn even when the popup is
hidden, and hiding a popup leaves part of the image on the
screen (Bakudankun).
Solution: Skip hidden popups when repainting images after the cursor is
undrawn or the window is exposed. Redraw the area the image
covered when the popup is hidden or closed, also for the GDI
backend (Hirohito Higashi).
fixes: #20796
closes: #20798
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0819: MS-Windows: sixel image shown as raw text in the console
Problem: On the MS-Windows console a popup image is displayed as the raw
sixel escape sequence instead of the image, unless
'termguicolors' is set (Bakudankun).
Solution: Write a DCS sequence with the console API that lets the console
parse it, no matter which write path the current colors select.
Keep track of the terminator across writes, since a long
sequence is split up (Hirohito Higashi).
fixes: #20795
closes: #20797
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0818: tests: client-server test fails without X11 server
Problem: When unable to connect to X11, serverlist({'list':1}) returns
a string instead of a list. This causes Test_remote_serverlist() in
test_vim9_builtin.vim to fail.
Solution: Raise E240 (No connection to the X server)
Additionally, This fix `Test_clientserver_env_method()` keeping
`VIM_CLIENTSERVER` environment variable instead of deleting it. This
allows certain `+clientserver` tests to pass, even in environments where
the X11 server is unavailable, provided that `VIM_CLIENTSERVER=socket`
is set.
closes: #20716
Co-Authored-By: James McCoy <jamessan@jamessan.com> Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0817: crash when building a stacktrace during an autocommand
Problem: Vim can crash while building a stack trace when an autocommand
is being triggered but has not matched a pattern yet, for
example at the more prompt with 'verbose' set (stefanos82).
Solution: Handle the autocommand entry on the execution stack that does
not have a script context yet (Hirohito Higashi).
fixes: #20730
closes: #20732
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0815: deeply nested regexp patterns may cause stack overflow
Problem: Deeply nested regexp groups can cause uncontrolled recursion
in the regexp compiler and exhaust the C stack.
Solution: Limit recursive regexp parsing depth in both the backtracking
and NFA compilers (lipengyu)
closes: #20731
Signed-off-by: lipengyu <lipengyu@kylinos.cn> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0814: Vim9: E1041 when reloading an autoload script with exported variables
Problem: Sourcing a Vim9 autoload script more than once fails with E1041
for its exported variables and constants, while exported functions
reload without error (ubaldot)
Solution: Give exported variables and constants the same clean slate as
functions on reload by removing them from the global namespace, so
the script body can define them again. Keep classes and enums:
objects created from the previous definition still refer to it, so
they are not redefined this way (Hirohito Higashi)
fixes: #19205
closes: #20726
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0813: dict_add_func() may corrupt funcref count on failure
Problem: dict_add_func() references the function only after a
successful dict_add(), on failure dictitem_free()
calls func_unref() without a matching func_ref(), corrupting
the reference count of a lambda or numbered function.
Solution: Take the reference before dict_add() so the unref on the
failure path is balanced (Yasuhiro Matsumoto).
related: #20668
closes: #20742
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0812: :argdelete with pattern leads to wrong argidx()
Problem: :argdelete with pattern leads to wrong argidx().
Solution: Correct argidx() in both branches of ex_argdelete(). Also use
ARGCOUNT macro in two more places (zeertzjq).
patch 9.2.0810: add_llist_tags() uses wrong function to free dict
Problem: add_llist_tags() uses wrong function to free dict on alloc
failure
Solution: Use dict_unref() (Yasuhiro Matsumoto).
add_llist_tags() released a dict_alloc()'d dict with vim_free() when
list_append_dict() failed, leaving a dangling pointer in the dict
garbage-collection chain. Use dict_unref().
related: #20668
closes: #20743
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0809: getframelayout() uses wrong function to free lists
Problem: getframelayout() uses wrong function to free lists on alloc
failure.
Solution: Use list_free() on alloc failure (Yasuhiro Matsumoto).
get_framelayout() released a list_alloc()'d list with vim_free() when
list_append_list() failed, leaving a dangling pointer in the list
garbage-collection chain. Use list_free() so it is unlinked.
related: #20668
related: #20743
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0808: getregionpos: double-free on alloc failure
Problem: getregionpos: double-free on alloc failure
Solution: Only free lists that were not appended (Yasuhiro Matsumoto).
add_regionpos_range() freed lists already linked into the result tree when
a later list_alloc()/list_append_list() failed, causing a double-free and
use-after-free. Only free lists that were not appended, and free them with
list_free() so they are unlinked from the garbage-collection chain.
related: #20668
closes: #20744
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0807: MS-Windows: ellipsis character is garbled
Problem: Source code is not treated as utf-8 by MSVC, so '…'
character in string literal is interpreted wrong.
Solution: Set utf-8 for both source and execution charsets.
patch 9.2.0806: 'showcmd' may show internal command keys
Problem: The `showcmd` statusline item may show internal command keys when a
`<Cmd>` or `<ScriptCmd>` mapping redraws the statusline, and may
leave stale text behind when `%S` is rendered directly.
Solution: Do not add these internal mapping dispatch keys to the `showcmd`
buffer, and keep the clear state in sync when `%S` renders it
(Barrett Ruth)
patch 9.2.0805: screenpos() "curscol" is wrong with 'rightleft'
Problem: With 'rightleft' set, the "curscol" value of screenpos() does not
point to the screen column where the cursor is placed.
Solution: Count "curscol" from the left side of the window, leaving "col"
and "endcol" as reading-order columns (Hirohito Higashi)
related: #20763
closes: #20786
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>