Commit Graph

22992 Commits

Author SHA1 Message Date
Thomas Dupuy 7d93ae57f0 patch 9.2.0027: filetype: yara files are not recognized
Problem:  filetype: yara files are not recognized
Solution: Detect *.yara and *.yar files as yara filetype
          (Thomas Dupuy).

Reference:
- https://github.com/VirusTotal/yara
- https://github.com/VirusTotal/yara-x

closes: #19460

Signed-off-by: Thomas Dupuy <thom4s.d@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0027
2026-02-19 16:12:06 +00:00
Foxe Chen e9e4e30ee4 patch 9.2.0026: The ss_pending_cmds variable is visible globally
Problem:  The ss_pending_cmds variable is visible globally
Solution: Make it static (Foxe Chen).

closes: #19461

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0026
2026-02-19 16:06:47 +00:00
Shane Harper ac4ccb8e53 runtime(less.sh): Fix reading from stdin.
Problem:  less.sh can't read from stdin; it will try to read from a file named "-" instead (after 515da6ecdb).
Solution: Do not prepend "-" with "--" in the arguments list for vim.

The following were checked manually and worked as expected:
    echo Test | less.sh
    echo Test | less.sh -
    less.sh some_file
    less.sh --cmd some_file  # vim will try to load "--cmd" and "some_file".
    less.sh                  # script outputs "No input."
    # All of the above repeated with the output piped to 'cat'.

closes: #19462

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 22:28:21 +00:00
Mao-Yining 47eb32fc92 translation(zh): Update menu translation for changed "Sponsor" entry
closes: #19463

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 22:24:14 +00:00
Mao-Yining 405ba5010d runtime(doctags): remove unused header include file
closes: #19465

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 22:19:06 +00:00
Hirohito Higashi 70a9273dcc Filelist: Fix CI error caused by xdg.vim missing in Filelist
closes: #19466

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 22:15:13 +00:00
Christian Brabandt 2e9e7cb8e0 runtime(xdg): Move viminfofile storage to state dir
fixes: #19456

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-19 12:24:53 +01:00
Christian Brabandt b9897ec27e runtime(xdg): remove // from 'undo' and 'viwedir'
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-19 07:38:04 +01:00
tris203 68dbb58d51 patch 9.2.0025: filetype: cshtml incorrectly recognized
Problem:  filetype: cshtml incorrectly recognized, razor files are not
          recognized
Solution: Detect *.cshtml and *.razor files as razor filetype
          (tris203)

Reference:
https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-10.0

closes: #19207

Signed-off-by: tris203 <admin@snappeh.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0025
2026-02-18 22:00:09 +00:00
Christian Brabandt 6cc291da06 patch 9.2.0024: Reading files with very long lines crashes with a segfault
Problem:  Reading files with lines approaching MAXCOL length crashes
          with segfault due to colnr_T overflow.
Solution: The split check 'linerest >= MAXCOL' fired too late because
          linerest could grow by up to 'size' bytes before the next
          check. Change threshold to 'linerest >= MAXCOL - size' to
          ensure the line passed to ml_append() stays within colnr_T
          range.

Note: supported by AI claude

fixes:   #17935
closes:  #18953
closes:  #19332

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0024
2026-02-18 21:52:40 +00:00
Christian Brabandt 0ece393844 patch 9.2.0023: fix integer overflow in ml_append_int() for long lines
Problem:  ml_append_int() crashes when appending lines near MAXCOL
          length due to signed integer overflow in space_needed
          calculation.
Solution: Change 'space_needed' from int to long to handle the
          'len + INDEX_SIZE' computation without overflow. Update
          db_free comparison casts from (int) to (long) to match.

Note: supported by AI claude

related: #17935
related: #18953
related: #19332

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0023
2026-02-18 21:49:58 +00:00
zeertzjq f06b3f529a patch 9.2.0022: bt_quickfix() is slow
Problem:  In order to prevent a use-after-free, bt_quickfix() added a
          call to buf_valid(), which slows it down, because Vim has to
          loop through many buffers all the time (v9.0.1859)
Solution: Patch v9.0.2010 fixed a similar problem, so that the call to
          buf_valid() is no longer required (zeertzjq)

fixes:  #19169
closes: #19183

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0022
2026-02-18 21:42:25 +00:00
thinca dd989ec9ca patch 9.2.0021: channel: connection timeout fails to fall back to IPv4
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>
v9.2.0021
2026-02-18 21:34:57 +00:00
zeertzjq f245e17ac7 patch 9.2.0020: Wrong shortened buffer after :cd with duplicate slashes
Problem:  Wrong shortened buffer name after :cd with duplicate slashes.
Solution: Skip over multiple consecutive path separators (zeertzjq).

related: neovim/neovim#37080
closes:  #19444

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0020
2026-02-18 21:27:50 +00:00
Christian Brabandt 06a604dc8e runtime(doc): Mention xdg.vim in version9.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 21:24:40 +00:00
Andrey Butirsky 4f04efb760 patch 9.2.0019: Hard to configure Vim according to full XDG spec
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>
v9.2.0019
2026-02-18 21:14:24 +00:00
Aliaksei Budavei dbd924f6a0 runtime(syntax-tests): Fail when executable syntax tests are found
The input files with syntax test cases are never compiled or
interpreted on behalf of test runners, just read, and their
parts are rendered in accordance with syntax definitions for
associated languages, to be compared with previously vetted
renderings.  Whether their arbitrary contents will be valid
programs, benign programs, etc., is left for test authors to
decide and verify in their own environments.  As executable
and non-executable files equally qualify for testing and yet
executability is never exercised, and since maintaining
executable files turns out to be a short-lived exception
than common practice, let us persist in keeping syntax files
non-executable and enforce it with a CI check.

closes: #19433

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 18:35:26 +00:00
Christoffer Aasted 472f46e231 README.md: mention r/vim and #vim libera
closes: #19440

Signed-off-by: Christoffer Aasted <dezzadk@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 18:29:16 +00:00
Christoffer Aasted 392ed90a9a patch 9.2.0018: high cpu usage with Wayland compositor
Problem:  High cpu usage with Wayland compositor
          (lilydjwg, after v9.2.0010).
Solution: Partly revert patch v9.2.0010 for now
          (Christoffer Aasted)

fixes:  #19448
closes: #19451

Signed-off-by: Christoffer Aasted <dezzadk@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0018
2026-02-18 18:13:18 +00:00
Yasuhiro Matsumoto 95e8faa24f patch 9.2.0017: popup: cannot allow to specify transparency
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>
v9.2.0017
2026-02-18 18:09:45 +00:00
Shane Harper 515da6ecdb runtime(less.sh): simplify the script and avoid startup messages
closes: #19445

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 17:30:27 +00:00
Yasuhiro Matsumoto 6c203072fe patch 9.2.0016: popup border not redrawn correctly with wide chars
Problem:  When a popup window's border overwrites part of a wide
          character from another popup, the remaining half loses its
          original attribute (background color) because it is reset to 0.
Solution: Modify screen_line(), screen_puts_len(), and screen_fill() to
          preserve the existing ScreenAttrs value when clearing wide
          character boundaries. Also ensure background data is refreshed
          for transparent popup cells (Yasuhiro Matsumoto).

closes: #19299

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0016
2026-02-18 17:19:42 +00:00
Christian Brabandt 89712b9f0e runtime(ccomplete): handle structs from tags file
fixes: #7292

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-18 17:39:01 +01:00
தமிழ் நேரம் b8b7df29c4 translation(ta): Update Tamil Translation
closes: #19435

Signed-off-by: தமிழ் நேரம் <67970539+TamilNeram@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-17 19:57:55 +00:00
Foxe Chen b3e5789521 patch 9.2.0015: Vim gets confused by OSC handling
Problem:  Vim gets confused by OSC handling, causing Vim to start in
          search mode (Shane Harper, after v9.1.1703)
Solution: In handle_mapping(), check if we are handling OSC sequences
          and if yes go straight to check_termcode() (Foxe Chen)

fixes:  #19426
closes: #19435

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0015
2026-02-16 22:26:57 +00:00
Hirohito Higashi 823f4f12b8 proto: make proto doesn't handle bool type correctly
closes: #19436

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-16 22:20:50 +00:00
Andrey Butirsky 9ebb666b8c runtime(doc): Update runtimepath default locations
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>
2026-02-16 22:18:39 +00:00
Yasuhiro Matsumoto 46e3978f73 patch 9.2.0014: unsafe string functions may lead to buffer overflows
Problem:  Unsafe string functions may lead to buffer overflows
Solution: Use vim_strncpy() instead of strpcy(), replace sprintf() by
          vim_snprintf() (Yasuhiro Matsumoto)

closes: #19412

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0014
2026-02-16 22:03:29 +00:00
Jan Palus c4b8783970 patch 9.2.0013: parallel make invocation may break Wayland header generation
Problem:  parallel make invocation may break Wayland header generation
Solution: Use single make target to generate Wayland protocol files.
          (Jan Palus)

$(WAYLAND_SRC) contains up to 4 files which, given right timing and
parallelization level, can spawn 4 independent `make` processes during
parallel build. Each process generates same set of files intermittently
leading to inconsistent results. Instead use one common target each
source file depends on.

fixes:  #19419
closes: #19420

Signed-off-by: Jan Palus <jpalus@fastmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0013
2026-02-16 21:48:45 +00:00
Christoffer Aasted 4255ba7ff4 patch 9.2.0012: Build fails when wayland is not defined
Problem:  Build fails when wayland is not defined
          (fjaell, after v9.2.0010)
Solution: Add ifdef GDK_WINDOWING_WAYLAND
          (Christoffer Aasted)

fixes:  #19429
closes: #19428

Signed-off-by: Christoffer Aasted <chr.aasted@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0012
2026-02-16 21:39:57 +00:00
Christian Brabandt 0e57151c18 patch 9.2.0011: A few double semicolons after statement
Problem:  A few double semicolons after statement
Solution: Remove those, add a codestyle test

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0011
2026-02-16 21:32:29 +00:00
Hirohito Higashi 48677d7747 runtime(doc): Update version9.txt, update the description of getwininfo()
closes: #19424

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 18:11:45 +00:00
zeertzjq e2473fe438 Fix a few more typos in various files
closes: #19427

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 18:03:37 +00:00
Andrey Butirsky ac1d379f3b runtime(doc): correct XDG runtimepath
There is no `/after` directory.

closes: #19431

Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 18:01:29 +00:00
Christoffer Aasted ac9426bf54 patch 9.2.0010: Using Wayland compositor is still slow
Problem:  Using the Wayland backend in GTK, rendering remains slow due
          to per-line redraws, unnecessary Cairo push/pop groups, and
          scroll operations that allocate new surfaces repeatedly.
Solution: Improve rendering performance (Christoffer Aasted).

This commit does the following:
- Add gui.is_wayland to detect Wayland backend
- Avoid blocking the input loop
- Skip early redraws; let the compositor handle full-screen redraws
- Use CAIRO_OPERATOR_SOURCE to overwrite instead of blend
- Reuse scroll source region for destination scroll region
- Optimize fast scroll-up
- Remove cairo_push_group/pop_group and cairo_clip in scroll path
  to reduce allocations (~50MB saved on 4K fractional scale)

Since Wayland redraws the entire screen between updates (unlike X11),
further performance gains are possible by batching drawing in other code
paths, e.g.:
- message.c: batch lines to avoid scroll
- term.c: batch terminal redraws

These could be refactored later to deferred redraw with Wayland.

closes: #19062

Signed-off-by: Christoffer Aasted <dezzadk@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0010
2026-02-15 17:27:24 +00:00
Christian Brabandt 9308c85a7e patch 9.2.0009: tests: test_cindent are not ordered
Problem:  tests: the tests test_cindent_* functions were numbered
          inconsistently, causing them to be executed in wrong order.
Solution: Rename the test_cindent functions with zero-padded numbers.

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0009
2026-02-15 16:41:34 +00:00
Mao-Yining abac1c1aa6 runtime(zip): use system() instead of :!
- ':!' is not stable, so use system() to get more consistent behaviour.
- Only warns when using 'pwsh'.
- Remove trailing spaces.

closes: #19370

Co-Authored-by: @lxhillwind
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 16:36:29 +00:00
Char 13223921e0 patch 9.2.0008: MS-Windows: font size calculation may be wrong
Problem:  MS-Windows: font size calculation may be wrong when font does
          not specify a valid ascent value. (Char, after v9.1.2129)
Solution: Calculate ascent as a ratio of ascent to total font height
          with a fallback if metrics are zero.

Fallback to default value when font does not specify ascent value.

As proposed in https://github.com/vim/vim/pull/19318#issuecomment-3864669253

related: #19318
closes:  #19367

Signed-off-by: Char <peacech@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0008
2026-02-15 16:27:52 +00:00
Anttoni Erkkilä 9af18686c7 patch 9.2.0007: cindent: recognizing labels within commented lines
Problem:  Comment lines which start like a label are recognized as a
          label and indented based on that.
Solution: Check if the position is in a comment after recognizing a label
          in cin_islabel (Anttoni Erkkilä)

closes: #19397

Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0007
2026-02-15 16:21:15 +00:00
Peter Lustig 20b2365c5f patch 9.2.0006: powershell commands wrongly wrapped when executed
Problem:  powershell commands wrongly wrapped when executed
Solution: Use &{ ... } to wrap commands when powershell/pwsh is in use
          (Peter Lustig).

Allow compound commands with 'system()' when 'shell' is 'pwsh'

When the 'shell' option was set to 'powershell' or 'pwsh' and the
'system()' vimscript function was called with an argument containing two
or more shell commands (delimited by ';' or '&'), the function would
always fail with 'E282'.

The cause of the error was that VIM would wrap the shell command string
with parentheses (to allow the entire output to be redirected to a
temporary file for capturing) before actually passing it to the
PowerShell process for execution.

Unlike the typical shell that uses parentheses to group commands (and
possibly spawn a subshell), PowerShell uses them to resolve a single
command (pipeline) to an expression. To group multiple commands with
PowerShell, you must instead wrap them with either the subexpression
operator '$(...)' or an immediately evaluated script block '& { ... }'.
The latter option may be more efficient since it does not buffer its
output like for the former one does.

closes: #19401

Signed-off-by: Peter Lustig <tiamatX18@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0006
2026-02-15 16:14:11 +00:00
Christian Brabandt e0b10ce95a patch 9.2.0005: Coverity reports unreachable code
Problem:  Coverity reports unreachable code, CID: 1681310
Solution: Drop the ternary checking for non-NULL of from_encoding_raw.

closes: #19402

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0005
2026-02-15 16:07:27 +00:00
Radu Dineiu 0435abfaa1 runtime(fstab): Add cgroup2 to valid device types
closes: #19403

Signed-off-by: Radu Dineiu <radu.dineiu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 16:05:41 +00:00
Amelia Clarke 4a5c1601bc runtime(hare): update syntax script for Hare 0.26.0
closes: #19398

Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 16:04:14 +00:00
Peter Kenny 3794d9b33c runtime(vim): Error codes should not be highlighed with vim9CommentTitle
closes: #19390

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 15:59:36 +00:00
Miguel Barro a2d87ba615 runtime(netrw): Use right file system commands initialization for Windows
closes: #19287
fixes:  #12290

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 15:51:27 +00:00
zeertzjq 8b81a6b6e1 patch 9.2.0004: Changing hidden prompt buffer cancels :startinsert/:stopinsert
Problem:  Changing hidden prompt buffer cancels :startinsert/:stopinsert
          (after 9.0.1439).
Solution: Don't change mode for a prompt buffer in an autocommand
          window (zeertzjq).

closes: #19410

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0004
2026-02-15 15:38:19 +00:00
Christian Brabandt 9f76adeed8 patch 9.2.0003: tests: invalid indent in message.c
Problem:  tests: invalid indent in message.c
          (after: v9.2.0002)
Solution: Use tabs for indent

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0003
2026-02-15 15:35:37 +00:00
Christian Brabandt 93f05b6d4c Makefile: dosrt target fails because of duplicate lang directories
Problem:  Makefile: dosrt target fails because of duplicate lang directories
Solution: Rename the parent lang/ directory to readme/

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 15:31:26 +00:00
Bozhidar Batsov c68e64dac3 runtime(sh): fix spurious nextgroup=shComment on shEscape
Remove `nextgroup=shComment` from the `shEscape` syntax pattern.
This was causing `#` characters after escape sequences inside
double-quoted strings to be misinterpreted as comments, breaking
highlighting for the rest of the file.

Add a test case for escaped characters followed by # in double quotes.

fixes:  #19053
closes: #19414

Signed-off-by: Bozhidar Batsov <bozhidar@batsov.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 14:53:55 +00:00
Yasuhiro Matsumoto 76826c24df patch 9.2.0002: str2specialbuf() can be improved
Problem:  str2specialbuf() can be improved
Solution: Optimize str2specialbuf function in message.c
          (Yasuhiro Matsumoto)

closes: #19415

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0002
2026-02-15 14:50:35 +00:00