Commit Graph

22888 Commits

Author SHA1 Message Date
zeertzjq 21d591fb12 patch 9.1.2133: Another case of buffer overflow with 'helpfile'
Problem:  Another case of buffer overflow with 'helpfile'.
Solution: Leave room for "tags" in the buffer (zeertzjq).

closes: #19340

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2133
2026-02-06 09:37:58 +00:00
Christian Brabandt 0714b15940 patch 9.1.2132: [security]: buffer-overflow in 'helpfile' option handling
Problem:  [security]: buffer-overflow in 'helpfile' option handling by
          using strcpy without bound checks (Rahul Hoysala)
Solution: Limit strncpy to the length of the buffer (MAXPATHL)

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-5w93-4g67-mm43

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2132
2026-02-05 19:01:12 +00:00
Emir SARI 8bd1b7c51e translation(tr): Update Turkish translations
closes: #19334

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-04 17:24:53 +00:00
zeertzjq 91ec2c3ba8 CI: update FreeBSD runner to 15.0
closes: #19336

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-04 17:19:28 +00:00
zeertzjq 991434d8df patch 9.1.2131: tests: Test_diff_screen() fails on BSD
Problem:  tests: Test_diff_screen() fails on BSD
Solution: Use gdiff on BSD systems if available (zeertzjq).

related: #19336

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2131
2026-02-04 17:18:29 +00:00
Christian Brabandt 1cac0a5755 translation(sv): Remove duplicates from [g]vim.desktop.in
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-04 16:44:49 +00:00
Lifepillar bf18b5eb7b runtime(context): fix issue with SyncTeX and update command
Remove `--nonstopmode` because (a) ConTeXt always stops anyway, and (b)
`--nonstopmode` disables SyncTeX unconditionally. Add `--paranoid`,
which prevents the command to descend to `..` and `../..`.

Pass the typesetting command only the name of the input file rather than
its full path, as that is more compatible with ConTeXt's syncing
mechanism.

closes: #19323

Signed-off-by: Lifepillar <lifepillar@lifepillar.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-04 16:31:05 +00:00
Mao-Yining 03b42b2926 runtime(doc): add note for -complete=shellcmdline
closes: #19330

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-04 16:21:40 +00:00
zeertzjq a8ce914db1 patch 9.1.2130: Page scrolling in Insert mode beeps
Problem:  Page scrolling in Insert mode beeps (after 9.1.0211).
Solution: Fix incorrect return value of pagescroll(). Also invert the
          return value of scroll_with_sms() to be less confusing and
          match comments (zeertzjq).

fixes:  #19326
closes: #19327

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2130
2026-02-04 15:51:01 +00:00
Arkissa 61044eb536 runtime(haskellcomplete): fix Undefined variable b:completingLangExtension.
closes: #19259

Signed-off-by: Arkissa <mrarkssac@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-04 15:45:05 +00:00
Yasuhiro Matsumoto b46594eefb patch 9.1.2129: MS-Windows: font size calculation slightly wrong, causing line gaps
Problem:  MS-Windows: font size calculation slightly wrong, causing
          vertical line gaps (Maxim Kim, after v9.1.2127)
Solution: Update font size calculation when using DirectX
          (Yasuhiro Matsumoto).

Use pre-calculated font ascent from font metrics instead of fixed
formula (h * 0.83) to calculate text baseline. This prevents vertical
text shift when font fallback occurs with CJK characters.

closes: #19318

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.2129
2026-02-04 15:32:36 +00:00
Christian Brabandt 1ff963e15c runtime(doc): Update version9.txt with numbered patches
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-04 15:07:40 +00:00
Mateo Gjika 4b83d5ca76 runtimei(vim9): Always launch programs in background (linux)
closes: #19293

Signed-off-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-03 15:24:26 +00:00
தமிழ் நேரம் ac8e08c6aa translation(ta): Include Tamil Translation
closes: #19312

Signed-off-by: தமிழ் நேரம் <67970539+TamilNeram@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-03 15:21:41 +00:00
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