Commit Graph

23495 Commits

Author SHA1 Message Date
Yasuhiro Matsumoto 22aedc4a90 patch 9.2.0397: tabpanel: double-click opens a new tab
Problem:  tabpanel: double-click opens a new tab page
Solution: Do not create a new tab page when using a double click
          (Yasuhiro Matsumoto).

The tabpanel click handler inherited the tabline behavior where a
double-click opens a new, empty tab page.  Unlike the tabline, the
tabpanel has no "empty area": every row maps to some tab, so this
fires on any double-click in the tabpanel and can generate stray
empty tabs.  The behavior is also not documented for the tabpanel.

Skip the new-tab branch when the click originated in the tabpanel
and fall through to the regular tab-switch path instead.  The
tabline behavior is unchanged.

closes: #20044

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0397
2026-04-26 16:53:58 +00:00
Doug Kearns 076366bd4e runtime(javascript): Fix regex highlighting after (
- Fix regex highlighting after opening parens, javascriptParens was
  matching later.  Fixes issue #20069.
- Add missing regex flags.
- Mark the file as unmaintained.  Thanks Claudio for all your work.

closes: #20076

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:52:21 +00:00
zeertzjq c23bfd7922 runtime(help): fix wrong check for existing HelpComplete function
To check for an existing HelpComplete function, exists('*HelpComplete')
should be used, as exists('HelpComplete') still returns 0 after sourcing
the ftplugin.

closes: #20073

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:36:23 +00:00
Doug Kearns 3cc7d50716 runtime(algol68): Add new syntax file, ftplugin and filetype detection
- Add a syntax file update to Neville Dempsey's long-serving version
- Add a new rudimentary ftplugin
- Add filetype detection

Changes to the syntax file include:
- improved prelude, number and symbol highlighting
- prelude highlighting tests
- updated boiler plate

Note that these runtime files currently target Algol 68 Genie employing
the default UPPER stropping regime.  Support for GNU Algol 68 should
also be usable with the UPPER stropping regime, although somewhat less
complete.  Full support for the SUPPER stropping regime in GNU Algol 68
is also planned.

closes: #19818

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Janis Papanagnou <janis_papanagnou@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:31:55 +00:00
Doug Kearns 1ce03d674a runtime(dockerfile): Update syntax, fix RUN command highlighting
Allow for docker comments to be interspersed in a multiline (continued)
RUN command argument.

fixes:  #8364
closes: #19829

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:26:19 +00:00
Yasuhiro Matsumoto 2baef82cd1 patch 9.2.0396: tests: Test_error_callback_terminal is flaky on macOS
Problem:  tests: Test_error_callback_terminal is flaky on macOS
Solution: Use WaitForAssert() to make it more reliable
          (Yasuhiro Matsumoto).

term_wait() only waits for terminal screen updates and does not
guarantee that the err_io 'pipe' callback has fired, so on macOS
the assert_match() against g:error frequently runs before sh has
written "sh: XXXX: not found", causing the test to flake.

Replace term_wait() + assert_match() with WaitForAssert() so each
assertion polls until the callback delivers the expected output.
Also defer sending "exit" until the stderr message has been seen,
to avoid losing the stderr write to the exit race.

closes: #20075

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0396
2026-04-26 09:22:38 +00:00
Christian Brabandt bf6892aaab runtime(doc): Update documentation on :z
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 09:18:07 +00:00
Peter Cardenas 0ca1121d1f runtime(help): make help omnifunc global
closes: #20024

Signed-off-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:42:57 +00:00
D. Ben Knoble 8d9c383aaf patch 9.2.0395: tests: Test_backupskip() may read from $HOME
Problem:  tests: Test_backupskip() may read from $HOME
Solution: Set $HOME to an empty value, use --clean
          (D Ben Knoble)

Even though we unset HOME, we can see via scriptnames that user files
are still sourced! One of my installed plugins warns when not compiled
with +python3, so this test has a "press Enter" prompt.

Use `--clean` like most other GetVimProg()'s do to fix it. Some tests
use `system()` instead, but that turns this test into a failure rather
than passing; I'm not sure why other tests don't suffer from this.

To prove to ourselves, we can use code like this:

    diff --git i/src/testdir/test_options.vim w/src/testdir/test_options.vim
    index a408e20e1..044364a54 100644
    --- i/src/testdir/test_options.vim
    +++ w/src/testdir/test_options.vim
    @@ -1179,6 +1179,7 @@ func Test_backupskip()
       " P_NODUP).  Run this in a separate instance and write v:errors in a file,
       " so that we see what happens on startup.
       let after =<< trim [CODE]
    +      call writefile([execute('scriptnames')], 'foo')
           let bsklist = split(&backupskip, ',')
           call assert_equal(uniq(copy(bsklist)), bsklist)
           call writefile(['errors:'] + v:errors, 'Xtestout')
    @@ -1196,7 +1197,7 @@ func Test_backupskip()
       " unset $HOME, so that it won't try to read init files
       let saveenv['HOME'] = getenv("HOME")
       call setenv('HOME', v:null)
    -  exe 'silent !' . cmd
    +  exe 'silent !' . cmd .. ' --cmd "echo &rtp"'
       call assert_equal(['errors:'], readfile('Xtestout'))

       " restore environment variables

Here, that causes "foo" to include a bunch of files under ~/.vim. I'm
not sure why this happens, but lets paper over it for the test.

We can also tell that (orthogonal to --clean) setting HOME='' works too.
Let's do that in addition since unsetting HOME isn't quite enough.

closes: #20051

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0395
2026-04-26 08:33:59 +00:00
Yasuhiro Matsumoto 8f9cde4592 patch 9.2.0394: xxd: offsets greater than LONG_MAX print as negative
Problem:  xxd: offsets greater than LONG_MAX print as negative
Solution: Use "%lu" to print unsigned long value
          (Yasuhiro Matsumoto)

closes: #20055

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0394
2026-04-26 08:22:23 +00:00
svardew 807f2cd789 CI: Fix syntax error in lychee URL checker
fixes: #20040

Signed-off-by: svardew <svardew@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:16:59 +00:00
Christian Brabandt 1de887681d No guidance for AI coding agents
Problem:  No guidance for AI coding agents working in the Vim
          repository.
Solution: Add AGENTS.md to the repository documenting build
          and test commands, repository layout, commit format,
          C and Vim9-script conventions, test conventions, help
          file style, and release policy, so that AI agents can
          produce patches that match project expectations.

closes: #20039

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:11:59 +00:00
dependabot[bot] e7eef554f3 CI: Bump the github-actions group across 1 directory with 3 updates
Bumps the github-actions group with 3 updates in the / directory: [msys2/setup-msys2](https://github.com/msys2/setup-msys2), [actions/cache](https://github.com/actions/cache) and [github/codeql-action](https://github.com/github/codeql-action).

Updates `msys2/setup-msys2` from 2.31.0 to 2.31.1
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/msys2/setup-msys2/compare/v2.31.0...v2.31.1)

Updates `actions/cache` from 5.0.4 to 5.0.5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5.0.4...v5.0.5)

Updates `github/codeql-action` from 4.35.1 to 4.35.2
- [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.35.1...v4.35.2)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-version: 2.31.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: 5.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 4.35.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

closes: #20063

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:05:33 +00:00
Yasuhiro Matsumoto 0c2ac3480a patch 9.2.0393: MS-Windows: link error with XPM support on UCRT64
Problem:  MS-Windows: link error with XPM support on UCRT64
Solution: Make_cyg_ming.mak: allow XPM to point to system layout with
          X11/ headers (Yasuhiro Matsumoto)

When XPM is set to a system prefix such as /msys64/ucrt64 (where xpm.h
lives in include/X11/), the existing -I flags miss the header.  Add
-I $(XPM)/include/X11 so both the bundled layout (xpm/include/xpm.h)
and the system layout (include/X11/xpm.h) work.

closes: #20064

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0393
2026-04-26 07:57:14 +00:00
Hirohito Higashi 32a30cb5a0 runtime(doc): Update docs about tabpanel
closes: #20067

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-25 17:56:30 +00:00
Christian Brabandt 1940bcb243 patch 9.2.0392: tests: Some tests are flaky
Problem:  tests: Some tests are flaky and cause CI to fail
Solution: Add WaitForAsserts() calls to reduce flakiness

closes: #20050

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0392
2026-04-25 17:50:47 +00:00
Christian Brabandt 5f7c52408f runtime(doc): Update the ga output to match the actual output
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-25 17:46:51 +00:00
Christian Brabandt 10b57290d3 patch 9.2.0391: tests: Comment in test_vim9_cmd breaks syntax highlighting
Problem:  tests: Comment in test_vim9_cmd breaks syntax highlighting
Solution: Move the comment into the function and use the # as comment
          marker instead

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0391
2026-04-25 16:49:21 +00:00
Vitaliy Gromov 0f9218851d translation(ru): Fix typo in "може" to "можете" in lang/README.ru.txt
closes: #20047

Signed-off-by: Vitaliy Gromov <101171374+VitaliyGromov@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-23 16:03:31 +00:00
Bruno Belanyi 521eac1877 patch 9.2.0390: filetype: some Beancount files are not recognized
Problem:  filetype: some Beancount files are not recognized
Solution: Detect *.bean files as beancount filetype
          (Bruno Belanyi)

closes: #20037

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0390
2026-04-23 15:56:30 +00:00
Hirohito Higashi 44f707da6a patch 9.2.0389: DECRQM still leaves stray "pp" on Apple Terminal.app
Problem:  DECRQM was still sent to Apple Terminal.app before its DA2
          reply was processed, leaving a literal "pp" on screen.
          may_req_decrqm() was called from vim_main2()
          right after may_req_termresponse(), at which point
          term_props[TPR_DECRQM].tpr_status was still TPR_UNKNOWN, so
          the `!= TPR_NO` guard let the request through (after v9.2.0387)
Solution: Send DECRQM from handle_version_response() once
          term_props[TPR_DECRQM].tpr_status == TPR_YES, the same
          pattern already used for t_RS (TPR_CURSOR_STYLE) and t_RC
          (TPR_CURSOR_BLINK), which deliberately wait for the DA2
          reply to avoid the same echo-on-screen issue on Apple
          Terminal.app and Gnome terminal.  Drop the now-unused
          may_req_decrqm() helper and its call site in vim_main2()
          (Hirohito Higashi).

fixes:   #19852
related: #19938
closes:  #20038

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: John Marriott <basilisk@internode.on.net>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0389
2026-04-22 20:29:08 +00:00
zeertzjq f194676c93 patch 9.2.0388: strange indent in update_topline()
Problem:  strange indent in update_topline()
Solution: Fix the indentation (zeertzjq)

closes: #20033

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0388
2026-04-22 16:09:06 +00:00
Hirohito Higashi cee8fd73eb patch 9.2.0387: DECRQM request may leave stray chars in terminal
Problem:  Sending DECRQM from handle_version_response() caused DECRPM
          responses to arrive during user input processing, leaving
          bytes in typebuf when clear_showcmd() ran.  This made
          visual-mode showcmd (e.g. "7" line count after V<C-D><C-D>)
          intermittently disappear, failing many screendump tests on CI.
Solution: Move DECRQM request out of handle_version_response() and send
          it at startup via may_req_decrqm(), following the existing
          may_req_termresponse() and may_req_bg_color() pattern.
          Add TPR_DECRQM property set per terminal from the DA2 reply,
          and route DECRQM sends through a may_req_decrqm() helper using
          the termrequest_T pattern, skipping terminals known to
          mishandle it (Foxe Chen, Hirohito Higashi).

fixes:  #19852
closes: #19938

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0387
2026-04-21 21:03:25 +00:00
Yasuhiro Matsumoto 2ea4a7c3b7 patch 9.2.0386: No scroll/scrollbar support in the tabpanel
Problem:  No scroll/scrollbar support in the tabpanel
Solution: Add support for it (Yasuhiro Matsumoto)

closes: #19979

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0386
2026-04-21 20:39:22 +00:00
D. Ben Knoble 10040bc9cd runtime(sh): allow "#" in special derefs
Code like ${!#} flags the "#" as shDerefWordError [1]; the "!prefix"
syntax region delegates to one of the shDerefSpecial handlers via
@shDerefList, but it misses the "#" case as valid for ${##} and ${!#}.

[1]: https://vi.stackexchange.com/q/48617/10604

Correct that. Indirection is only valid in Bash in Ksh, so rearrange the
"!" handling to be conditional.

closes: #20016

Helped-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:59:07 +00:00
zeertzjq 33f3965087 patch 9.2.0385: Integer overflow with "ze" and large 'sidescrolloff'
Problem:  Integer overflow with "ze" and large 'sidescrolloff'.
Solution: Check for overflow to avoid negative w_leftcol (zeertzjq).

closes: #20026

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0385
2026-04-21 19:41:37 +00:00
zeertzjq 3918f3232f runtime(doc): fix incorrect description of 'scrolloffpad'
closes: #20029

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:34:18 +00:00
Jon Parise 16d28548d2 runtime(graphql): Update syntax script to September 2025 spec
A new graphqlEscape syntax graph has been introduced to represent escape
sequences within strings, including the braced unicode form (\u{H+})
added in the September 2025 specification.

See: https://spec.graphql.org/September2025/

closes: #20030

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:25:54 +00:00
Jaehwang Jung d4fb31762e patch 9.2.0384: stale Insstart after <Cmd> cursor move breaks undo
Problem:  A <Cmd> command executed from Insert mode can sync undo and
          move the cursor before the next edit. stop_arrow() saved the
          new cursor line for undo, but left Insstart at the previous
          insertion point. A line-start backspace could then delete
          lines above the saved line without saving the joined range,
          leaving a pending undo entry whose bottom resolved above
          its top and raising E340.
Solution: Update Insstart and Insstart_textlen after the pending undo
          save so the next edit starts from the command-updated cursor
          position (Jaehwang Jung).

closes: #20031

AI-assisted: Codex

Signed-off-by: Jaehwang Jung <tomtomjhj@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0384
2026-04-21 19:24:14 +00:00
Christian Brabandt 405e2fb6d5 patch 9.2.0383: [security]: runtime(netrw): shell-injection via sftp: and file: URLs
Problem:  runtime(netrw): shell-injection via sftp: and file: URLs
          (Joshua Rogers)
Solution: Escape temporary file names, harden filename suffix regex,
          drop unused g:netrw_tmpfile_escape variable

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0383
2026-04-21 19:08:05 +00:00
Foxe Chen d0b6ee320b patch 9.2.0382: Wayland: focus-stealing is non-working
Problem:  Wayland: focus-stealing is non-working
Solution: Remove it, the feature could be re-implemented using
          clipboard-providers feature, see :h wayland-primary-selection
          (Foxe Chen).

closes: #19984

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0382
2026-04-20 18:24:17 +00:00
Christian Brabandt ec3f79e037 patch 9.2.0381: Vim9: Missing check_secure() in exec_instructions()
Problem:  Vim9: Missing check_secure() when executing ISN_STOREENV
          instruction (Andrej Tomči)
Solution: Add check_secure(), add test.

closes: #19992

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0381
2026-04-20 17:44:45 +00:00
glepnir b328686d6a patch 9.2.0380: completion: a few issues in completion code
Problem: ins_compl_stop() sets compl_best_matches = 0, but that's a
         pointer, should reset compl_num_bests instead,
         find_common_prefix() reads cpt_sources_array[cur_source] without
         checking cur_source != -1 which causes an OOB for -1,
         find_next_completion_match(): second `if` in the pending loop
         should be `else if`. Forward paging only moves one step per call.

Solution: Reset compl_num_bests instead, add a check for cur_source not
          equal -1, change if to else if (glepnir)

closes: #20000

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0380
2026-04-20 17:36:56 +00:00
Hirohito Higashi fe3c27ce0b patch 9.2.0379: gui.color_approx is never used
Problem:  gui.color_approx in gui_T has not been assigned anywhere since
          patch 7.4.2094 ("The color allocation in X11 is overly
          complicated", 2016), which dropped the single "gui.color_approx = TRUE;"
          site.  Because the member is zero-initialized and never written, the
          check "if (gui.color_approx)" in gui_mch_init() is always false and the
          "E458: Cannot allocate colormap entry, ..." warning can never be
          emitted.
Solution: Remove the struct member and the unreachable branch.  The E458
          error definition is removed. Update the example error code
          "E458" in the ex_eval.c comment to "E457" accordingly.

closes: #20007

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0379
2026-04-20 17:24:15 +00:00
Hirohito Higashi 146d5da0d1 patch 9.2.0378: Using int as bool type in win_T struct
Problem:  Several win_T fields are declared as "int" or "char" but are
          used strictly as boolean flags with TRUE/FALSE values.  The
          integer types obscure the boolean intent and are wider than
          needed.
Solution: Change the following win_T members to bool (stdbool.h) and
          update their assignments from TRUE/FALSE to true/false
          accordingly.

The following conversions have been done:
- int -> bool (10 members):
  w_set_curswant, w_botfill, w_old_botfill, w_do_win_fix_cursor,
  w_popup_fixed, w_border_highlight_isset, w_cline_folded,
  w_redr_status, w_arg_idx_invalid, w_has_scrollbar
- char -> bool (4 members):
  w_topline_was_set, w_ru_empty, w_fold_manual, w_foldinvalid

No existing code compares these members against TRUE/FALSE explicitly or
uses ++/-- / bitwise ops on them, so only plain assignments are
affected.

Excluded:
- w_locked (recursion counter with ++/--),
- w_want_scrollbar (may hold -1 from dict_get_bool),
- w_winbar_height (used in arithmetic and exposed as number via
  getwininfo()).

related: #20005
closes:  #20008

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0378
2026-04-20 17:12:29 +00:00
Hirohito Higashi 3c3050e648 patch 9.2.0377: Using int as bool type in gui_T struct
Problem:  Several gui_T fields are declared as "int" or "char" but are
          used strictly as boolean flags with TRUE/FALSE values.  The
          integer types obscure the boolean intent and are wider than
          needed.
Solution: Change the following gui_T members to bool (stdbool.h) and
          update their assignments from TRUE/FALSE to true/false
          accordingly (Hirohito Higashi)

The following conversions have been done:
- int -> bool (11 members):
  in_focus, in_use, starting, dying, dofork, dospawn,
  pointer_hidden, force_redraw, directx_enabled, font_can_bold,
  which_scrollbars[3]
- char -> bool (2 members):
  cursor_is_valid, menu_is_active

No existing code compares these members against TRUE/FALSE explicitly
(e.g. "== TRUE"), so only plain assignments are affected.

gui_init() used counter-style "--gui.starting" / "++gui.starting" to
temporarily clear the flag across a call to gui_mch_enable_menu().
With gui.starting now bool this triggers -Werror=bool-operation, so
replace it with an explicit save/restore.

X11 Bool members (rsrc_rev_video, color_approx) are intentionally left
unchanged: rsrc_rev_video is registered as an X Toolkit resource with
XtRBool / sizeof(Bool) and must keep the int-sized X11 Bool type.

closes: #20005

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0377
2026-04-20 16:33:57 +00:00
Furkan Sahin f74a41620b patch 9.2.0376: Vim9: elseif condition compiled in dead branch
Problem:  When an `if` condition is constant true, the `else` block is
          skipped during compilation. However, any `elseif` condition
          within that skipped block was still compiled. This caused
          errors when the condition referenced variables only declared
          in the skipped block or when it checked for missing features
          (like `has('clipboard')`) (Coacher)
Solution: In compile_elseif(), when scope->se_skip_save is
          already SKIP_YES, skip compiling the elseif condition
          expression using skip_expr_cctx() (Furkan Sahin)

fixes:  #19160
closes: #20021

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0376
2026-04-20 16:22:50 +00:00
Furkan Sahin c9d4c1dc43 patch 9.2.0375: prop_find() does not find a virt text in starting line
Problem:  prop_find() does not find a virt text in the starting line
          (@rickhowe, after v9.2.0320)
Solution: Do not skip virtual text properties with tp_col == MAXCOL on
          the starting line (Furkan Sahin)

The column matching logic incorrectly skipped virtual text properties
with tp_col == MAXCOL on the starting line.  Exclude such properties
from the column range check so they are always found.

fixes:  #20013
closes: #20019

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0375
2026-04-20 16:20:12 +00:00
Barrett Ruth c62342e5cf patch 9.2.0374: c_CTRL-{G,T} does not handle offset
Problem:  c_CTRL-{G,T} does not handle offset, when cycling between
          matches
Solution: Refactor parsing logic into parse_search_pattern_offset() and
          handle offsets, note: highlighting does not handle offsets
          yet (Barrett Ruth).

fixes:  #19991
closes: #19998

Signed-off-by: Barrett Ruth <br.barrettruth@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0374
2026-04-20 16:08:47 +00:00
zeertzjq 49e8630a28 patch 9.2.0373: Ctrl-R mapping not triggered during completion
Problem:  Ctrl-R mapping not triggered during completion.
Solution: Move Ctrl-R check out of vim_is_ctrl_x_key()
          (zeertzjq).

fixes:  #20004
closes: #20006

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0373
2026-04-20 15:46:08 +00:00
Yasuhiro Matsumoto 73ba353c9d patch 9.2.0372: pum: rendering issues with multibyte text and opacity
Problem:  pum: rendering issues with multibyte text and opacity
Solution: Fix trailing-cell handling near popup text boundary,
          use popup attrs on opaque popup text,
          preserve right border when bg wide char spills,
          blend popup text bg with underlying bg,
          fix wide background char corruption
          (Yasuhiro Matsumoto)

closes: #20017

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0372
2026-04-20 15:35:39 +00:00
Eisuke Kawashima 1c88aee1fa runtime: Remove wrong syn oneline keyword from a few syntax files
Also:
- drop a few trailing whitespaces
- mark the oneline keyword for :syn keyword as error in the
  Vim syntax script, add tests for it.

closes: #20018

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 15:14:31 +00:00
Bez Hermoso b30803b231 patch 9.2.0371: filetype: ghostty config files are not recognized
Problem:  filetype: ghostty config files are not recognized
Solution: Detect ghostty configuration files as ghostty filetype,
          include a simple ghostty filetype plugin (Bez Hermoso)

closes: #20002

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Bez Hermoso <me@bez.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0371
2026-04-20 14:50:37 +00:00
Hirohito Higashi 2c436be6f7 patch 9.2.0370: duplicate code with literal string_T assignment
Problem:  Duplicate code with literal string_T assignment
Solution: Add STR_LITERAL_SET() macro for string_T literal assignment
          (Hirohito Higashi).

Previously, assigning a string literal to a string_T variable required
two lines that repeated the literal:

    s.string = (char_u *)"open";
    s.length = STRLEN_LITERAL("open");

Writing the literal twice is error-prone -- a typo in one of them
leaves the pointer and the cached length out of sync.

Add a STR_LITERAL_SET() macro in macros.h so that the assignment can
be written in one statement with the literal appearing only once:

    STR_LITERAL_SET(s, "open");

Replace all occurrences of the two-line pattern across the codebase
with the new macro.

No functional change.

related: #19999
related: #20023
closes:  #20025

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0370
2026-04-20 14:43:52 +00:00
Hirohito Higashi 6ecff78129 patch 9.2.0369: multiple definitions of STRING_INIT macro
Problem:  multiple definitions of STRING_INIT macro
Solution: Refactor use of STRING_INIT and use a single
          STR_LITERAL_INIT() macro instead
          (Hirohito Higashi)

Consolidate the ad-hoc STRING_INIT() macros that were defined and used
locally in multiple source files. Define a single STR_LITERAL_INIT()
macro in macros.h and replace all previous STRING_INIT() usages with it.

No functional change.

related: #19999
closes:  #20023

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0369
2026-04-19 21:51:51 +00:00
John Marriott c13232699d patch 9.2.0368: too many strlen() calls when adding strings to dicts
Problem:  too many strlen() calls when adding strings to dicts
Solution: Refactor code to use string_T, use dict_add_string_len()
          instead of dict_add_string() (John Marriott)

Additionally:
- In textprop.c, in function prop_fill_dict() use a string_T to store
  local variable text_align.
- In popupwin.c, use a string_T to store struct member pp_name in struct
  poppos_entry_T.
- In mark.c, refactor function add_mark() to pass in the length of
  argument mname.
- In insexpand.c:
  ->Use a string_T to store the elements of static array
    ctrl_x_mode_names.
  ->Refactor function trigger_complete_done_event():
  ->->change type of argument char_u *word to string_T *word.
  ->->make one access of array ctrl_x_mode_names instead of two.
  ->Refactor function ins_compl_mode() to accept a string_T to return the
    resulting string.
- In fileio.c:
  ->Refactor function getftypewfd() to accept a string_T to return the
    resulting string.
  ->In function create_readdirex_item() use a string_T to store local
    variable q.
- In cmdexpand.c, store global cmdline_orig as a string_T.
- In autocmd.c, in function f_autocmd_get() use a string_T to store local
  variables event_name and group_name. Measure their lengths once when
  they are assigned so they are not remeasured on each call to
  dict_add_string() in the subsequent for loop.
- In channel.c, in function channel_part_info() drop local variable status
  and use s instead. Make s a string_T.

closes: #19999

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0368
2026-04-19 21:10:43 +00:00
Yasuhiro Matsumoto 723c0acf25 patch 9.2.0367: runtime(netrw): ~ note expanded on MS Windows
Problem:  runtime(netrw): ~ note expanded on MS Windows
          (Tom Vamvanij)
Solution: Expand ~ on MS Windows (Yasuhiro Matsumoto)

On Windows, ":Explore ~" did nothing because the tilde expansion was
gated to Unix/Cygwin only.  Additionally, substitute() interprets
backslashes in the replacement string specially (e.g. \U as a case
modifier), which would corrupt $HOME values like C:\Users\name even
if the branch were taken.

Include has("win32") in the guard, anchor the pattern to the start of
the string, and escape backslashes, ampersands and tildes in $HOME
before substituting.

fixes:  #20003
closes: #20014

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0367
2026-04-19 20:40:58 +00:00
Yasuhiro Matsumoto 237d77e07c patch 9.2.0366: pum: flicker when updating pum in place
Problem:  pum: flicker when updating pum in place
Solution: Skip update_screen() when the popup menu is redrawn
          at the same position (Yasuhiro Matsumoto).

closes: #20015

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0366
2026-04-19 20:25:02 +00:00
Hirohito Higashi 1966a1c896 patch 9.2.0365: using int as bool
Problem:  using int as bool
Solution: refactor: use bool type for internal flags in buf_T
          (Hirohito Higashi)

Change the type of 23 internal state flag fields in buf_T from int
to bool for improved type clarity and code readability.

These fields are pure boolean flags that are never accessed via the
option system's varp (which uses *(int *)varp = value), never compared
with int fields holding non-0/1 values, and never use tristate values.

Converted fields:
- State flags: b_dev_valid, b_saving, b_mod_set, b_new_change,
  b_marks_read, b_modified_was_set, b_did_filetype, b_keep_filetype,
  b_au_did_filetype, b_u_synced, b_scanned, b_p_initialized
- Characteristic flags: b_has_textprop, b_may_swap, b_did_warn,
  b_help, b_spell, b_shortname, b_has_sign_column, b_netbeans_file,
  b_was_netbeans_file, b_write_to_channel, b_diff_failed

All TRUE/FALSE assignments to these fields have been updated to
true/false accordingly. The type of temporary save variables
(e.g. help_save in tag.c) has also been adjusted to bool.

Option value fields (b_p_XXX) are kept as int because they are
accessed via the option system and some use tristate (-1) semantics.
Fields compared with int option values (b_start_eof, b_start_eol,
b_start_bomb) are also kept as int to preserve comparison integrity.

closes: #20020

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0365
2026-04-19 20:10:20 +00:00
Christian Brabandt 618a327ce6 patch 9.2.0364: tests: test_smoothscroll_textoff_showbreak() fails
Problem:  tests: test_smoothscroll_textoff_showbreak() fails
          (after v9.2.0363)
Solution: Add missing CheckRunVimInTerminal

related: #20011

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0364
2026-04-19 20:01:11 +00:00