Commit Graph

22874 Commits

Author SHA1 Message Date
Sean Dewar 392b428d12 patch 9.1.2128: Heap use after free in buf_check_timestamp()
Problem:  heap UAF if autocommands from reloading a file changed outside
          of Vim wipe its buffer.
Solution: Validate the bufref after buf_reload (Sean Dewar)

closes: #19317

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2128
2026-02-03 15:00:12 +00:00
Mao-Yining a2e76bb8fe runtime(c): only set keywordprg when there has 'man'
closes: #19319

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-03 14:51:24 +00:00
Mark Woods ac5af8ecd3 runtime(vim): Fix for :VimKeywordPrg when syntax does not match
When using vim9-syntax plugin, :VimKeywordPrg does not lookup functions
correctly, as it relies solely on syntax names to find the help topic.

The syntax keyword used for builtin function is vi9FuncNameBuiltin in
vim9-syntax plugin, not vimFuncName expected by :VimKeywordPrg, so the
fallback rules apply, and there is no fallback rule for function calls.

Fix by just checking if the first char after topic is '(', and if so
assume help topic is a function.

closes: #19320

Signed-off-by: Mark Woods <mwoods.online.ie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-03 14:48:58 +00:00
Daniel Nylander 0eb8e4de49 translation(sv): Update tutor1.sv to version 1.7
Updated Swedish translation of the Vim tutor from version 1.5 to 1.7.

Added missing lessons:
- Lesson 1.1.5: TEXT EDITING - APPENDING
- Lesson 1.1.6: EDITING A FILE
- Lesson 1.1 SUMMARY
- Lesson 1.2.3: ON OPERATORS AND MOTIONS
- Lesson 1.2.4: USING A COUNT FOR A MOTION
- Lesson 1.2.5: USING A COUNT TO DELETE MORE
- Lesson 1.2 SUMMARY
- Lesson 1.3.2: THE REPLACE COMMAND
- Lesson 1.3 SUMMARY
- Lesson 1.5.3: SELECTING TEXT TO WRITE (visual mode)
- Lesson 1.6: OPEN, APPEND, REPLACE, COPY/PASTE, OPTIONS
- Lesson 1.7: ONLINE HELP
- Lesson 1.8: CREATE A STARTUP SCRIPT
- Lesson 1.9: CONCLUSION

Original Swedish translation by Johan Svedberg.
Updated by Daniel Nylander.

closes: #19321

Signed-off-by: Daniel Nylander <po@danielnylander.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-03 14:44:04 +00:00
Daniel Nylander a4ee225290 translation(sv): Add Swedish translation of tutor2
Translated by Daniel Nylander.

Covers:
- Text objects (iw, aw, i[, a[, etc.)
- Named registers (a-z)
- Expression register (=)
- Numbered registers (0-9)
- Special registers (+, *, _, -)
- Marks and mark motions

related: #19321

Signed-off-by: Daniel Nylander <po@danielnylander.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-03 14:41:08 +00:00
Daniel Nylander 5c93eae7c6 translation(sv): Fix typo and help.svx formatting
- Fix typo: paranteser -> parenteser (line 240)
- Fix h j k l navigation block being too wide
- Shorten Swedish text to fit proper column width

Closes feedback from PR #18849

related: #19321

Signed-off-by: Daniel Nylander <po@danielnylander.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-03 14:40:47 +00:00
Christian Brabandt 093d0cb1cf runtime(doc): Clarify the behaviour of command completion functions
closes: #19294

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-02 16:55:41 +00:00
Yasuhiro Matsumoto fccd6f9b14 patch 9.1.2127: MS-Windows: DirectX renders font too small
Problem:  MS-Windows: DirectX renders font too small in comparison to
          the GDI rendering (Linwei, after v9.1.2125)
Solution: Implement proper font clipping (Yasuhiro Matsumoto)

related: #19254
closes:  #19304

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2127
2026-02-02 10:23:27 +00:00
Maxim Kim c50be218cd runtime(odin): update indent and syntax scripts
- fix indent of a closing } after another } on previous line
- fix indent of consequent #+feature lines
- highlight #+features

closes: #19310

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-02 10:16:36 +00:00
Mao-Yining f39e7a89f3 runtime(doc): update win_findbuf() return value
[] can also seen as `list<number>`

closes: #19311

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-02 10:15:04 +00:00
Hirohito Higashi 65c5b8e7d0 patch 9.1.2126: vim --version used single column for feature list
Problem:  vim --version used single column for feature list
          (Ben Knoble, after v9.1.1898)
Solution: Restore old behaviour and assume 80 columns, making sure
          the feature list is shown in several columns
          (Ben Knoble, Hirohito Higashi).

fixes:  #19309
closes: #19315

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2126
2026-02-02 10:08:10 +00:00
Doug Kearns 2e4c98b6f3 runtime(vim): Update base syntax, match Vim9 :unlet command
closes: #19290

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-01 15:03:46 +00:00
Doug Kearns 079700ee45 runtime(doc): Improve the description at :help :cwindow
Describe the "height" argument when opening the quickfix window.

See: #19302 ("[cl]window" has different behaviour from "[cl]open" about
their argument [height])

related: #19302
closes:  #19305

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-01 14:57:50 +00:00
Yasuhiro Matsumoto b39b065d6f patch 9.1.2125: MS-Windows: DirectX rendering can be improved
Problem:  MS-Windows: DirectX rendering can be improved
Solution: Use lpDx advance, fix vertical text shift and correct
          font-size calculations (Yasuhiro Matsumoto).

This changes DirectWrite rendering to:
- Respect lpDx-provided advance widths instead of always adjusting to
  cell width.
- Use a fixed baseline derived from cell geometry to prevent vertical
  shifts when font fallback occurs (e.g. with CJK characters).
- Correctly convert LOGFONT lfHeight to DirectWrite font size using font
  metrics for closer GDI compatibility.

closes: #19254

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2125
2026-01-31 16:23:28 +00:00
GX 01956225bc runtime(qf): Update quickfix syntax
closes: #19296

Signed-off-by: GX <59413576+gx089@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-31 16:19:36 +00:00
Doug Kearns dd9f7e6cbb runtime(doc): Fix some overlength lines
closes: #19286

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-31 16:13:39 +00:00
Maxim Kim c99aaf4c87 runtime(colors): improve catppuccin colorscheme
- fix readability issue with IncSearch/CurSearch
- add highlights to some of ftplugins distributed with vim

closes: #19295

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-31 16:08:51 +00:00
Yasuhiro Matsumoto 2b184d4b97 patch 9.1.2124: blob2str() does not handle UTF-16 encoding
Problem:  blob2str() does not handle UTF-16 encoding
          (Hirohito Higashi)
Solution: Refactor the code and fix remaining issues, see below
          (Yasuhiro Matsumoto).

blob2str() function did not properly handle UTF-16/UCS-2/UTF-32/UCS-4
encodings with endianness suffixes (e.g., utf-16le, utf-16be, ucs-2le).
The encoding name was canonicalized too aggressively, losing the
endianness information needed by iconv.

This change include few fixes:

- Preserve the raw encoding name with endianness suffix for iconv calls
- Normalize encoding names properly: "ucs2be" → "ucs-2be", "utf16le" →
  "utf-16le"
- For multi-byte encodings (UTF-16/32, UCS-2/4), convert the entire blob
  first, then split by newlines

convert_string() cannot handle UTF-16 because it uses string_convert()
which expects NUL-terminated strings. UTF-16 contains 0x00 bytes within
characters (e.g., "H" = 0x48 0x00), causing premature termination.
Therefore, for UTF-16/32 encodings, the fix uses string_convert_ext()
with an explicit input length to convert the entire blob at once.

The code appends two NUL bytes (ga_append(&blob_ga, NUL) twice) because
UTF-16 requires a 2-byte NUL terminator (0x00 0x00), not a single-byte
NUL.

- src/strings.c: Add from_encoding_raw to preserve endianness, special
  handling for UTF-16/32 and UCS-2/4
- src/mbyte.c: Fix convert_setup_ext() to use == ENC_UNICODE instead of
  & ENC_UNICODE. The bitwise AND was incorrectly treating UTF-16/UCS-2
  (which have ENC_UNICODE + ENC_2BYTE etc.) as UTF-8, causing iconv
  setup to be skipped.

fixes:  #19198
closes: #19246

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2124
2026-01-31 15:59:01 +00:00
Yegappan Lakshmanan ecc3faef61 patch 9.1.2123: using NOT with a float returns a float in legacy script
Problem:  using NOT with a float returns a float in legacy vim script
          (kennypete)
Solution: Return a number instead of a float (Yegappan Lakshmanan)

fixes:  #19282
closes: #19289

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2123
2026-01-31 10:29:01 +00:00
Yegappan Lakshmanan 3a5e57fc7e patch 9.1.2122: Vim9: Negating a float doesn't result in a bool
Problem:  Vim9: Negating a float doesn't result in a boolean
          (kennypete)
Solution: Make it return a boolean (Yegappan Lakshmanan).

related: #19282
related: #19289

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2122
2026-01-31 10:25:50 +00:00
Yegappan Lakshmanan f5466b5a73 patch 9.1.2121: Vim9: type issue when modifying a variable using :legacy
Problem:  Vim9: type issue when modifying a variable using :legacy
          (kennypete)
Solution: In a vim9 script, when modifying a variable using the legacy
          command, check the type (Yegappan Lakshmanan).

fixes:  #18531
closes: #19292

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2121
2026-01-31 10:07:02 +00:00
thinca 611d7e19f7 patch 9.1.2120: blob2str() does not restore trailing newline
Problem:  blob2str() does not restore trailing newline
Solution: Append empty string (thinca).

closes: #19288

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2120
2026-01-31 09:52:00 +00:00
Doug Kearns 602e6042a3 runtime(doc): Reformat example at :h gui-w32-fullscreen
Use standard indent and remove unnecessary bang.

closes: #19285

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-31 09:42:05 +00:00
Kevin Goodsell 371583642a patch 9.1.2119: tests: Test_language_cmd fails on OpenBSD
Problem:  tests: Test_language_cmd fails on OpenBSD because the test
          uses an invalid locale name and expects the command to produce
          an error. OpenBSD accepts (almost) any locale name as valid by
          design, so the :lang command succeeds and the test fails.
Solution: Slightly update the "bad" locale name to make it something
          that OpenBSD considers invalid by adding a dot (but not ending
          with ".UTF-8"). Maintain the original two underscores in the
          name because that ensures Windows will also see it as invalid
          (Kevin Goodsell).

closes: #19280

Signed-off-by: Kevin Goodsell <kevin-opensource@omegacrash.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2119
2026-01-30 10:00:27 +00:00
zeertzjq ce1e562fda patch 9.1.2118: 'cursorline' missing after :diffput to empty buf
Problem:  'cursorline' and part of 'statusline' are missing after
          :diffput to an empty buffer.
Solution: Make sure the cursor doesn't go beyond the last line after
          :diffput (zeertzjq)

related: neovim/neovim#37621
closes:  #19281

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2118
2026-01-30 09:57:56 +00:00
Christian Brabandt cfe9d83a85 patch 9.1.2117: unnecessary braces in terminal.c
Problem:  unnecessary braces in terminal.c
          (Christ van Willegen, after v9.1.2113)
Solution: Remove braces

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2117
2026-01-30 09:50:46 +00:00
Yasuhiro Matsumoto 57b577df32 patch 9.1.2116: crash when using 'tagfunc'
Problem:  crash when using 'tagfunc' (Rodrigo Queipo)
Solution: Do not add the user_data to the 'info' dictionary when called
          for insert mode completion (the TAG_INS_COMP flag is set).
          Completion should not depend on the state of a previous tag
          jump. (Yasuhiro Matsumoto)

fixes:  #19255
closes: #19284

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2116
2026-01-30 09:45:55 +00:00
Yasuhiro Matsumoto a7c28bd1b9 patch 9.1.2115: CI: wrong preprocessor indentation
Problem:  CI: wrong preprocessor indentation
          (after v9.1.2114)
Solution: Update indentation (Yasuhiro Matsumoto)

closes: #19283

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2115
2026-01-30 09:35:05 +00:00
Foxe Chen 0ac59be071 patch 9.1.2114: modeless selection not copied to * register
Problem:  modeless selection not copied to * register when P in
          guioptions (Coacher)
Solution: Make the "P" flag override the "a" and "A" flag
          (Foxe Chen)

fixes:  #19187
closes: #19244

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2114
2026-01-29 19:18:10 +00:00
MuntasirSZN b817536b8f runtime(tera): update syntax files to support many more tera code
This includes macros, keys etc. which were not highlighted before.

closes: #19276

Signed-off-by: Muntasir Mahmud <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-29 19:03:42 +00:00
Yasuhiro Matsumoto d0502fdb26 patch 9.1.2113: potential NULL pointer dereference issues
Problem:  potential NULL pointer dereference issues
          (EpheraXun)
Solution: Check returned pointer to be non NULL.
          (Yasuhiro Matsumoto)

fixes:  #19273
closes: #19274

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2113
2026-01-29 18:43:12 +00:00
Christian Brabandt 7599a18997 runtime(doc): Mark the use of "\n" in the tabpanel as experimental
related: #19123

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-28 22:18:21 +00:00
taylor.fish 663d809194 runtime(rust): Fix Rust indentation when string contains "if"
indent/rust.vim behaves incorrectly when a string literal contains the
substring "if".

For example, in this code:

    let x = "
                motif
    ";
    struct X {
                }

indent/rust.vim thinks that the closing "}" should line up with "motif".

This patch fixes the issue by checking whether the "if" is in a string
literal or comment before considering it to be a match for a subsequent
brace (and also by requiring it to start on a word boundary).

Add an indent test to ensure this does not regress.

closes: #19265

Signed-off-by: taylor.fish <contact@taylor.fish>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-28 22:07:16 +00:00
Christian Brabandt 427fa3e1e4 runtime(doc): 'ignorecase' affects character classes in the old engine
fixes: #19230

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-28 21:58:28 +00:00
Peter Kenny 754fc64d2e runtime(helpcurwin): fix E121 error
closes: #19270

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-28 21:45:50 +00:00
zeertzjq 3f7be0d7e1 patch 9.1.2112: long statusline may crash if using singlebyte encoding
Problem:  long statusline may crash if using singlebyte encoding
          (fizz-is-on-the-way)
Solution: Drop the non-mbyte codepath and always use the mbyte code
          (zeertzjq)

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2112
2026-01-28 21:42:40 +00:00
Hirohito Higashi 271a46811e patch 9.1.2111: Vim9: no error for elseif/else after else
Problem:  Vim9: no error for elseif/else after else
Solution: Report an error (Hirohito Higashi)

closes: #19263

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2111
2026-01-28 19:21:10 +00:00
Roland Hieber b73565d89d runtime(make): Declare syntax file orphaned
closes: #19267

Signed-off-by: Roland Hieber <rohieb@rohieb.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-28 18:54:48 +00:00
Ron Aaron c979211675 runtime(8th): Update syntax script
closes: #19261

Signed-off-by: Ron Aaron <ron@aaron-tech.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-28 18:50:55 +00:00
zeertzjq 0f3b7d2563 runtime(doc): fix missing code block marker in ft-python-syntax
related: #18922
closes:  #19261

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-26 19:56:27 +00:00
Mateo Gjika b8efcc0202 runtime(vim): set 'path' to common Vim directories
closes: #19219

Signed-off-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-26 19:45:21 +00:00
Daniel Nylander b8c1ef5a64 translation(sv): Add Swedish translation
closes: #18849

Signed-off-by: Daniel Nylander <po@danielnylander.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-26 19:40:37 +00:00
Rob B 632fd8bb96 runtime(python): Highlight built-in constants in Python
Also add syntax tests for those newly constants.

closes: #17788
closes: #18922

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-26 18:52:04 +00:00
Mateo Gjika ca6726285c runtime(c): set 'keywordprg' to :CKeywordPrg in a GUI
closes: #19222

Signed-off-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-26 18:46:41 +00:00
zeertzjq 0f8c685a68 runtime(doc): fix inconsistent indent in ft_rust.txt
related: #19251
closes:  #19257

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-25 18:17:40 +00:00
Maxim Kim b42434915b runtime(colors): include new catppuccin colorscheme
closes: #19258

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-25 18:14:22 +00:00
Doug Kearns 17bba758fa runtime(doc): Fix overlength lines in :help {russian,vietnamese}.txt
closes: #19252

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-25 18:05:43 +00:00
Christian Brabandt c035f518c3 CI: check encoding of runtime files with utf-8 name
related: #19240
closes:  #19253

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-25 18:04:44 +00:00
Aman Verma dd3aa92ce6 runtime(toml): update syntax and ftplugin.
Add "-" to iskeyword. This required a change to the syntax files too
because they were using the word begin and end atoms.

closes: #17259

Co-authored-by: Teemu Ikonen <tpikonen@mailbox.org>
Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Aman Verma <amanraoverma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-25 18:01:31 +00:00
Christian Brabandt 5268b95150 runtime(doc): clarify the help style a bit
related: #19250

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-25 17:59:30 +00:00