Commit Graph
37716 Commits
Author SHA1 Message Date
Justin M. Keyes cd2db7913a fix(cwd): nvim_win_set_buf changes global CWD #41328
Problem:
nvim_win_set_buf() on a non-current win, while the current win has
a win-local dir, changes the global CWD:

    :vsplit | lcd ..
    :call nvim_win_set_buf(other_win, buf)
    :wincmd l
    :verbose pwd
    [global] /parent        " expected: the initial cwd

Analysis:
`globaldir` is where to return when no local dir applies; NULL means the
process CWD is already there. Switching to a window with no local dir
makes update_cwd() chdir back to `globaldir` and clear it. kCtxKeepCwd
restores the process CWD but not that bookkeeping, so the restored
window-local dir is mistaken for the global one.

Solution:
Save/restore `globaldir` with the CWD.
2026-08-15 11:45:44 -04:00
Justin M. Keyes 9cca923ab4 fix(extmarks): redo of a mark created during an edit #41324
Problem:
A mark created by `nvim_buf_set_extmark()` while an undo block is open
never comes back on redo.

Analysis:
Undo deletes the text it covers and collapses the range; redo replays
the splices, which re-insert the text but cannot re-expand the mark.
`extmark_set()` records a position only for a mark it moves, not for one
it creates.

Solution:
Record the created position for redo; undo leaves the mark to the splice
replay, since it did not exist before the edit. Each side of a paired
mark gets its own entry. Redo also revives a mark that undo invalidated,
else its position returns but its highlight does not.
2026-08-15 10:13:32 -04:00
Jan Edmund Lazo aef9356e34 build(vim-patch): fix compiled,popup-window regexp for '|' #41326
git "-I" regex seem to be "extended".
grep's default regex is "basic".
Fix regexps for switch/case "runtime/doc/*.txt"
based on the "*.h" switch/case.
2026-08-15 08:26:57 -04:00
Justin M. Keyes a458bfb595 Merge #41316 from janlazo/na-patch-tcd
build(vim-patch): detect more n/a patches for popupwin and terminal
2026-08-15 07:22:16 -04:00
Barrett Ruth b169d9376c test(dir_spec): fix failures with PUC Lua 2026-08-15 13:07:21 +08:00
Jan Edmund Lazo c7ee6af777 build(vim-patch): v8.1.2219 is n/a
Vim's TerminalWinOpen seems to be required because of Vim
buffer-job-popupwin implementation.
Based on the patch, I'm puzzled why fzf needs this on Vim.

Nvim's TermOpen, TermEnter, and detection mechanisms to know
if buffer is on a (active,visible) window should suffice to not port it.

If there was a feature request or issue without a merged fix,
then I can't find it.

https://github.com/junegunn/fzf/pull/2000
2026-08-15 00:24:09 -04:00
Jan Edmund Lazo d137073024 build(vim-patch): v8.1.2195 is n/a 2026-08-14 17:13:30 -04:00
Jan Edmund Lazo 692e41bb66 build(vim-patch): v8.1.1713 is n/a 2026-08-14 17:13:29 -04:00
Jan Edmund Lazo 2b232a9d6e build(vim-patch): v8.1.1628 docs are n/a 2026-08-14 17:13:29 -04:00
Jan Edmund Lazo 38cd0ba1b8 build(vim-patch): n/a autocmd from 8.1.1218 2026-08-14 17:13:29 -04:00
Christian Clason 1c9002a70e build(deps): bump tree-sitter-diff to v0.2.0 2026-08-14 19:12:05 +02:00
Christian Clason 99056b84b8 build(deps): bump tree-sitter to 21e3614b8 2026-08-14 18:32:17 +02:00
Barrett Ruth 0af3b9827b feat(dir): user can sort/filter listings, DirReadPost event #41138
Problem:
Directory listing entries cannot be customized (filtered, reordered).
Listings are read by a BufReadCmd, which suppresses BufReadPost, so they
are the only buffers with no post-read event to hook.

Solution:
Introduce a post-render User autocmd `DirReadPost`, marking the dir
buffer writable for the duration and before the cursor is placed, so
handlers can sort or filter it with ordinary commands. Document common
recipes
2026-08-14 12:25:31 -04:00
Justin M. Keyes 64a301184e feat(input)!: CmdAtom event #41297
Problem:
There is no unified notion of a "user action".

Vim processes input by one-char-at-a-time, and mostly throws away any
hints it might gather about the user's action, with one exception: it
stores the last _edit_ action (the "redo buffer", encoded as
unstructured `["x][v][count]body` bytes).

Plugins can only observe individual keys (vim.on_key) and high-level
effects (TextChanged, CursorMoved).

Solution:
- Users can subscribe to `CmdAtom` events to handle any user action.
  - Event is deferred; handlers cannot cancel or interfere with user
    actions.
- Capture `CmdSpec` from the normal/insert/visual subsystems.
  - typeahead/readahead stay unstructured (`buffheader_T`): they are key
    streams, not commands.
  - the redo/record buffers become `StringBuilder`: fewer
    allocations/copies.
- Repurpose the input/redo engine to accept `CmdSpec` objects.

"atom": one repeatable unit of user input, as a resolved (post-mapping)
keysequence plus structured fields. Only user actions, not `:normal`,
API calls, or non-"t" `feedkeys`.

BREAKING: dot-repeat of an Insert session, replays the entire session
including cursor-moves (:help ins-repeat).

BREAKING: dot-repeat of a Visual operation, replays the selection
instead of operating on a fixed-size region.
2026-08-14 09:30:31 -04:00
github-actions[bot] 485ae7e31a docs: update version.c #41288
vim-patch:9.2.0946: GTK2/3: mouse move starts Visual selection after a dialog
vim-patch:9.2.0947: GTK4: screen is cleared when moving the mouse after startup
vim-patch:9.2.0948: GTK4: mouse move starts Visual selection after a dialog
vim-patch:9.2.0949: GDK_KEY_VoidSymbol might be undefined
vim-patch:9.2.0951: GTK3: cursor does no longer blink
vim-patch:9.2.0955: tests: terminal tests are flaky
vim-patch:9.2.0956: GTK4: crash when the window is resized while redrawing

vim-patch:8.1.0768: updating completions may cause the popup menu to flicker
vim-patch:8.1.0863: cannot see what signal caused a job to end
vim-patch:8.1.0876: completion match not displayed when popup menu is not shown
vim-patch:8.1.0894: MS-Windows: resolve() does not return a reparse point
vim-patch:8.1.1218: cannot set a directory for a tab page
vim-patch:8.1.1224: MS-Windows: cannot specify font weight
vim-patch:8.1.1417: MS-Windows: resolve() does not resolve all components of path
vim-patch:8.1.1473: new resolve() implementation causes problem for plugins
vim-patch:8.1.1525: cannot move a popup window with the mouse
vim-patch:8.1.1558: popup_menu() and popup_filter_menu() are not implemented yet
vim-patch:8.1.1561: popup_setoptions() is not implemented yet
vim-patch:8.1.1577: command line redrawn for +arabic without Arabic characters
vim-patch:8.1.1580: cannot make part of a popup transparent
vim-patch:8.1.1589: popup window does not indicate scroll position
vim-patch:8.1.1597: cannot scroll a popup window with the mouse
vim-patch:8.1.1609: the user cannot easily close a popup window
vim-patch:8.1.1612: cannot show an existing buffer in a popup window
vim-patch:8.1.1626: no test for closing a popup window with a modified buffer
vim-patch:8.1.1628: popup window functions not in list of functions
vim-patch:8.1.1713: highlighting cursor line only works with popup_menu()
vim-patch:8.1.1714: cannot preview a file in a popup window
vim-patch:8.1.1718: popup menu highlighting does not look good
vim-patch:8.1.1770: cannot get the window ID of the popup preview window
vim-patch:8.1.1784: MS-Windows: resolve() does not work if serial nr duplicated
vim-patch:8.1.1787: cannot resize a popup window
vim-patch:8.1.1799: cannot avoid mapping for a popup window
vim-patch:8.1.1813: ATTENTION prompt for a preview popup window
vim-patch:8.1.1819: :pedit does not work with a popup preview window
vim-patch:8.1.1880: cannot show extra info for completion in a popup window
vim-patch:8.1.1882: cannot specify properties of the info popup window
vim-patch:8.1.1884: cannot use mouse scroll wheel in popup in Insert mode
vim-patch:8.1.1892: missing index entry and option menu for 'completepopup'
vim-patch:8.1.1904: cannot have an info popup align with the popup menu
vim-patch:8.1.1905: cannot set all properties of the info popup
vim-patch:8.1.1906: info popup size is sometimes incorrect
vim-patch:8.1.1908: every popup window consumes a buffer number
vim-patch:8.1.1928: popup windows don't move with the text when making changes
vim-patch:8.1.1969: popup window filter is used in all modes
vim-patch:8.1.2039: character from 'showbreak' does not use 'wincolor'
vim-patch:8.1.2092: MS-Windows: redirect in system() does not work
vim-patch:8.1.2093: MS-Windows: system() test fails
vim-patch:8.1.2139: the modifyOtherKeys codes are not tested
vim-patch:8.1.2142: some key mappings do not work with modifyOtherKeys
vim-patch:8.1.2153: combining text property and syntax highlight is wrong
vim-patch:8.1.2155: in a terminal window 'cursorlineopt' does not work properly
vim-patch:8.1.2158: terminal attributes missing in Terminal-normal mode
vim-patch:8.1.2192: cannot easily fill the info popup asynchronously
vim-patch:8.1.2208: Unix: Tabs in output might be expanded to spaces
vim-patch:8.1.2273: wrong default when "pos" is changed with popup_atcursor()
vim-patch:8.1.2279: computation of highlight attributes is too complicated
vim-patch:8.1.2324: with of scrollbar in popup menu not taken into account
vim-patch:8.1.2351: 'wincolor' not used for > for not fitting double width char
vim-patch:8.1.2362: cannot place signs in a popup window
vim-patch:8.1.2386: 'wincolor' is not used for 'listchars'
vim-patch:8.1.2399: info popup on top of cursor if it doesn't fit
vim-patch:8.1.2415: popup menu flickers if an info popup is used
vim-patch:8.1.2418: bufnr('$') is wrong after recycling popup buffer
2026-08-14 07:35:15 -04:00
bfredl 69e61d52e2 Merge pull request #41186 from Rawan10101/fix-wasm-browser
feat(wasm): track and fix ongoing issues + add WASM build workflow
2026-08-14 12:59:12 +02:00
zeertzjqandAliaksei Budavei 24183950e1 vim-patch:5d41506: runtime(sh): Selectively suppress matching syntax errors (#41302)
As a refinement upon "g:sh_no_error", support not matching
particular classes of syntax errors.  Look up syntax rule
names and list them with:
‐-----------------------------------------------------------
let g:sh_no_error_rules = ["shCurlyError", "shParenError"]
‐-----------------------------------------------------------

closes: vim/vim#20935

https://github.com/vim/vim/commit/5d41506eb4895fbf0b6ccf4067c7f6e3c8ac568b

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-08-14 08:47:30 +08:00
zeertzjqandFionn Fitzmaurice 1a9467ab44 vim-patch:9.2.0957: filetype: ArgoCD config file is not recognized (#41301)
Problem:  filetype: ArgoCD configuration file is not recognized
Solution: Detect */argocd/config as yaml filetype (Fionn Fitzmaurice).

Reference:
https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_configure/#options-inherited-from-parent-commands

closes: vim/vim#21031

https://github.com/vim/vim/commit/7807dd22793da0e826618c0ca9c6210bbc1ea3f5

Co-authored-by: Fionn Fitzmaurice <git@fionn.computer>
2026-08-14 08:47:14 +08:00
zeertzjqandEmilien Breton ca88ad10c8 vim-patch:e402d1c: runtime(doc): improve documentation for |v_gF| (#41300)
https://github.com/vim/vim/commit/e402d1c443ec9f542df0503d765a09c32eabd7b4

Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
2026-08-14 07:46:52 +08:00
Barrett Ruth fc3f71fb7d fix(messages): inputlist() offers the mouse when it cannot be used (#41280)
Problem:
`inputlist()` advertises "click with the mouse" purely because it
implements click selection, so under the default `'mouse'` of "nvi" it
offers a click that command-line mode never receives.

Solution:
Only offer the mouse when `'mouse'` covers command-line mode, the same
condition `:help inputlist()` already documents.
2026-08-14 07:38:39 +08:00
Nathan B. faf8345eef fix(diagnostic): don't accumulate BufRead autocmds for unloaded buffers #40869
Problem:
vim.diagnostic.set() defers extmark position computation for an
unloaded buffer via a once=true BufRead autocmd, registering a new one
on every call without replacing the previous one. Each pending autocmd
also retains that call's diagnostics.

Solution:
Instead of registering an autocmd per set() call, register a single
static BufRead autocmd that computes positions from the diagnostic
cache for any buffer with cached diagnostics when it is read. This
removes the per-call registration entirely (nothing left to
accumulate) and means diagnostics cleared while the buffer was
unloaded no longer produce stale extmarks.
2026-08-13 09:17:16 -04:00
Justin M. Keyes a1ea2f35be Merge #41075 from echasnovski/pack-packspec-part1 2026-08-13 08:53:49 -04:00
rawan10101 b78adb98ba fix(wasm): remove custom log path and disable autoread 2026-08-13 15:52:30 +03:00
dependabot[bot] 3934dabfbb ci: bump vmactions/openbsd-vm
Bumps the github-actions group with 1 update in the / directory: [vmactions/openbsd-vm](https://github.com/vmactions/openbsd-vm).


Updates `vmactions/openbsd-vm` from 1.4.5 to 1.4.6
- [Release notes](https://github.com/vmactions/openbsd-vm/releases)
- [Commits](https://github.com/vmactions/openbsd-vm/compare/c941015845c0f0c429676840963dc63b226d4f69...e6c68b637a12e83519688d115d57d5b0b53923cd)

---
updated-dependencies:
- dependency-name: vmactions/openbsd-vm
  dependency-version: 1.4.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-13 14:46:55 +02:00
rawan10101 0eddc16ed0 ci: add nvim.wasm build and nightly release
Add a dedicated nvim.wasm build workflow and
include the resulting WASM artifact in nightly releases.
2026-08-13 15:23:48 +03:00
zeertzjqandDoug Kearns e8a1addb5a vim-patch:90a9a8c: runtime(algol68): Update syntax, fix syncing (#41291)
Use "fromstart" syncing.

Pragment regions are delimited by shared start/end tokens which render
other syncing types largely useless.  A sync point located in the middle
of a multiline comment cannot distinguish the end token from a start
token and the erroneously created region runs to EOF.

closes: vim/vim#21032

https://github.com/vim/vim/commit/90a9a8c7523741f4a9cd091a0f1727902e8c9340

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-13 08:27:50 +08:00
zeertzjq f75e87fcfc Merge pull request #41290 from zeertzjq/vim-9.2.0945
vim-patch:9.2.{0945,0950,0953,0954}
2026-08-13 08:15:39 +08:00
2dec97464c vim-patch:9.2.0954: u_read_undo() can be improved (after 9.2.0935)
Problem:  u_read_undo() has comments that do not add anything to what
          the code says (afte rv9.2.0935).
Solution: Drop the redundant comments (Hirohito Higashi).

related: vim/vim#20942
closes:  vim/vim#21028

https://github.com/vim/vim/commit/ecfea491aa964311a42f888277da7911c9d6900d

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
7525e87f10 vim-patch:9.2.0953: insert completion code can be improved
Problem:  The duplicate-check hashtab in insexpand.c has comments that
          do not add anything to what the code says (after v9.2.0909).
Solution: Drop the redundant comments.

related: vim/vim#20926
closes:  vim/vim#21027

https://github.com/vim/vim/commit/4dde4afa1d188d92aa7ae91db43956bd83aad758

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
39dc19bab4 vim-patch:9.2.0950: transstr() can be improved (after 9.2.0906)
Problem:  transstr() has comments that do not add anything to what the
          code says, and it casts a length to int only to cast it back to
          size_t.
Solution: Drop the comments and keep the length in a size_t
          (Hirohito Higashi).

related: vim/vim#20925
closes:  vim/vim#21026

https://github.com/vim/vim/commit/fe65307d49b482ffdd4c81ce46352ee091e2c67b

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
5e0d4ba389 vim-patch:9.2.0945: sort() with a numeric option can be improved
Problem:  The comments on the precomputed sort keys explain the code by
          contrasting it with the previous implementation, and one of
          them exceeds 80 columns (after v9.2.0937).
Solution: Drop the redundant comments and shorten the union member ones
          (Hirohito Higashi).

related: vim/vim#21003
closes:  vim/vim#21030

https://github.com/vim/vim/commit/722f4292e55d48520b7e32cabb4b8640293d0977

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:52:57 +08:00
github-actions[bot] a63393396c docs: update version.c #41258
vim-patch:8.1.1523: cannot show range of buffer lines in popup window
vim-patch:8.1.1537: using "tab" for popup window can be confusing
vim-patch:8.1.1538: cannot specify highlighting for notifications
vim-patch:8.1.1548: popup_dialog() is not implemented
vim-patch:8.1.1553: not easy to change the text in a popup window
vim-patch:8.1.1559: popup window title property not implemented yet
vim-patch:8.1.1574: tabpage option not yet implemented for popup window
vim-patch:8.1.1659: popup window "mousemoved" values not correct
vim-patch:8.1.1673: cannot easily find the popup window at a certain position
vim-patch:8.1.1690: default padding for popup window menu is too much
vim-patch:8.1.1944: leaking memory when using sound callback
vim-patch:8.1.1999: calling both PlaySoundW() and PlaySoundA()
vim-patch:8.1.2193: popup_setoptions(popup_getoptions()) does not work
vim-patch:8.1.2250: CTRL-U and CTRL-D don't work in popup window
vim-patch:8.1.2292: v:mouse_winid not set on click in popup window
vim-patch:8.2.0238: MS-Windows: job_stop() results in exit value zero
vim-patch:8.2.0286: cannot use popup_close() for a terminal popup
vim-patch:8.2.2105: sound test is a bit flaky
vim-patch:8.2.2296: cannot use CTRL-N and CTRL-P in a popup menu
vim-patch:8.2.2950: sound code not fully tested
vim-patch:8.2.2959: sound_playfile() is not tested on MS-Windows
vim-patch:9.0.0800: compiler complains about repeated typedef
vim-patch:9.0.0999: memory may leak
vim-patch:9.0.2089: sound_playfile() fails when using powershell
vim-patch:9.1.0271: CI sound test aborts with undefined variable
vim-patch:9.1.0949: popups inconsistently shifted to the left
vim-patch:1f045f324 runtime(doc): clarify buffer deletion on popup_close()
vim-patch:9.1.1985: tests: test_sound.vim fails on Windows
vim-patch:3d863d6aa runtime(doc): Update popup width rule
vim-patch:9.2.0928: MinGW: tests hang when Vim is built with coverage enabled
vim-patch:9.2.0940: GTK4: columns are lost when a scrollbar appears
vim-patch:9.2.0943: test: test_hardcopy fails on GTK4 UI
vim-patch:c6b041c63 CI: Keep the GTK4 job from affecting the other jobs
2026-08-12 09:12:57 -04:00
Jan Edmund Lazo 1b79a5ff61 build(vim-patch): n/a popup_ api #41270
- enums
- macros
- struct members
- popup_.*()

8.1.1523

* build(vim-patch): 8.1.0863 is almost auto n/a

Can't ignore os_unix.c hunk for "failed:" .
2026-08-12 08:32:21 -04:00
f33c92348a vim-patch:9.2.0937: sort() with a numeric option converts each item on every comparison (#41286)
Problem:  sort() with "n", "N" or "f" converts an item to its number on
          every comparison.  For "n" that is a tv2string() plus strtod()
          per comparison, so sorting a list of numbers turns each number
          into a string and back O(n log n) times, dwarfing the sort.
Solution: Compute the numeric key of each item once, before the sort,
          and compare the stored key (Samuel Schlesinger).  Only the
          builtin numeric compare modes are affected; uniq(), which
          passes a bare list item to the compare function, and the
          string and user-function paths are unchanged.

Sorting a list of 100000 numbers (min of 3, macOS arm64):
- sort(l, 'n'):  0.205s -> 0.017s
- sort(l, 'N'):  0.017s -> 0.010s
- sort(l, 'f'):  0.014s -> 0.010s
The result is identical, including that a string is still treated as 0
in "n" mode and that "N" keeps full 64-bit precision.

Add Test_sort_numeric_precomputed(): a large shuffled list sorted with
"n", mixed integers and floats, int64 values beyond the exact range of
a double for "N", and uniq() over the non-precomputed path.

closes: vim/vim#21003

https://github.com/vim/vim/commit/c8c59db9dfdc2db5f17aa0a78ea1464f035bdf5e

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-12 11:45:38 +00:00
a0dc3f0067 vim-patch:9.2.0935: reading an undo file is slow with many undo headers (#41285)
Problem:  Reading an undo file resolves every stored sequence number
          with a linear scan over all headers, making loading
          quadratic in the number of undo states.
Solution: Sort uhp_table on uh_seq once and resolve each reference
          with a binary search; the duplicate uh_seq check becomes a
          single pass over the sorted table (Samuel Schlesinger).

At the default 'undolevels' of 1000 the quadratic cost is not
measurable; it takes 'undolevels' in the tens of thousands to matter.
Loading an undo file with 20000 states and 50 alternate branches with
:rundo goes from 1.49s to 0.11s (min of 3, macOS arm64), with the
same undotree().

Also make old_idx/new_idx/cur_idx and the loop index "i" long instead
of short/int: they index uhp_table, whose length num_head is a long
read from the file.  A short index truncated above 32767 headers,
making the restored b_u_oldhead/b_u_newhead/b_u_curhead pointers
wrong in exactly the many-headers case this change is about.

Add tests: a round-trip test with alternate branches that compares
the entries of the tree and the text at every sequence number, a
corruption test with a duplicated uh_seq, and a test for reading an
undo file with zero headers, which is written when only the line for
the "U" command is saved.

closes: vim/vim#20942

https://github.com/vim/vim/commit/fccf613c8f5b550797c08a45a768e14adefd882f

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-12 10:00:09 +08:00
zeertzjqandChristian Brabandt ecaf9e9396 vim-patch:02bf089: runtime(doc): clarify diff_filler() function (#41283)
fixes: vim/vim#20990

https://github.com/vim/vim/commit/02bf0893d536449548f91b75817748a5e25219c0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-08-12 08:24:48 +08:00
e9dc4da86e vim-patch:9.2.0938: cursorbind: cursor in the other window is not updated after undo (#41282)
Problem:  In diff mode with 'cursorbind' the cursor in the other window is
          not updated after an undo that changes which lines correspond.
Solution: Also check whether the text changed before skipping the update
          (Hirohito Higashi).

fixes:   vim/vim#20982
related: vim/vim#13219
related: vim/vim#13210
closes:  vim/vim#21004

https://github.com/vim/vim/commit/2045a20d4bf604c47828bfc22d2da25f0294bc01

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 00:16:08 +00:00
dependabot[bot] eb5c60b8c5 ci: bump github/codeql-action
Bumps the github-actions group with 1 update in the / directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.37.5 to 4.37.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.37.5...v4.37.6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-11 15:52:39 +02:00
rawan10101 014b00a642 fix(wasm): fix browser input and runtime exit handling
Use ev.key directly to preserve Caps Lock casing, implement clipboard
paste, and prevent :q/:qa from leaving the runtime in a loop.
2026-08-11 14:08:40 +03:00
Nathan Zeng 4a3197f2ad refactor(defaults): edit global cwd on "1-" #41254
Problem:
`1-` does nothing from a directory buffer, because we are already in the
buffer-local CWD. It's also unintuitive that this mapping behaves
differently based on the resolved CWD.

Solution:
Have `1-` open the global CWD.
2026-08-11 04:08:33 -04:00
2757f6eef9 vim-patch:9.2.0933: u_read_undo() leaks the file name when the undo file owner differs (#41269)
Problem:  When the owner of an undo file differs from the owner of
          the text file and the current user, u_read_undo() returns
          without freeing the file name it allocated with
          u_get_undo_file_name().
Solution: Free the file name before returning (Samuel Schlesinger).

Every other exit of the function frees it under the "theend" label;
this early return sits before the file pointer is initialized, so it
cannot use that label.

closes: vim/vim#20987

https://github.com/vim/vim/commit/d03735e8d29a228e6a37300335983101edb69431

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-11 10:35:51 +08:00
7be8a8dda3 vim-patch:9.2.0932: NFA engine fallback can double free the compiled program (#41268)
Problem:  When the automatic regexp engine falls back to the
          backtracking engine in vim_regexec_string(), the compiled
          program is freed before the replacement is compiled; when
          saving the pattern fails from being out of memory the
          caller's "regprog" is left pointing to freed memory and
          is freed again.
Solution: Free the previous program only after compiling the
          replacement succeeded, like vim_regexec_multi() already
          does (Samuel Schlesinger).

closes: vim/vim#20986

https://github.com/vim/vim/commit/cab0901f121d0fab74c9a42bb90583d59b3d3c21

Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-11 10:19:52 +08:00
zeertzjqandDoug Kearns 5bc08dbb46 vim-patch:6163d99: runtime(doc): Improve :help expr-number, mention unary +/- (#41267)
- Mention unary +/- use in both integer and floating-point descriptions.
- Add "0b" binary prefix tag to match existing "0o" and "0x" tags.

closes: vim/vim#20997

https://github.com/vim/vim/commit/6163d99a32a559e0a5387989f09c43c7870c249f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-11 10:19:38 +08:00
zeertzjqandJosef Schönberger 5f15c0e959 vim-patch:2e8c81e: runtime(strace): highlight stack trace as comment (#41266)
strace supports printing a complete stack trace for each syscall using
the `-k` (`--stack-trace`) flag. Highlight the trace as a comment.

closes: vim/vim#20998

https://github.com/vim/vim/commit/2e8c81ea093ca84fa8402cb140422d5338bbb6d9

Co-authored-by: Josef Schönberger <josef.schoenberger@tum.de>
2026-08-11 01:30:08 +00:00
dependabot[bot] e04196ea51 ci: bump the github-actions group across 1 directory with 3 updates
Bumps the github-actions group with 3 updates in the / directory: [github/codeql-action](https://github.com/github/codeql-action), [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `github/codeql-action` from 4.37.4 to 4.37.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.37.4...v4.37.5)

Updates `vmactions/freebsd-vm` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](https://github.com/vmactions/freebsd-vm/compare/77ed28d336d03fe19a3f4f7266c1d2c4714dd79d...83b151f58c6047089f4c80eb5ba2039d158ce093)

Updates `zizmorcore/zizmor-action` from 0.6.1 to 0.6.2
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/6fc4b006235f201fdab3722e17240ab420d580e5...3dc1ecc9bcb9e94e9b2c709687979e1298497054)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: vmactions/freebsd-vm
  dependency-version: 1.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-10 15:24:05 +02:00
bfredl 8a0eb8f10b Merge pull request #41212 from bfredl/unmagic
refactor(ex_cmds): use function arguments for magic behavior
2026-08-10 14:17:57 +02:00
bfredl 344ea602f6 refactor(ex_cmds): use function arguments for magic behavior
Now this was a cargo cult anti-pattern to write home about.
Doing painful save-and-restore bookkeeping around a separate
`magic_overruled` decoy global is just as messy as doing painful
save-and-restore logic around `p_magic` itself. only that now you need
to wrap every access to the effective value in a function call.

This replaces this with a marvellous new Clean Code technique™:
passing in the intended behavior as a function parameter to functions
where either the option or an explicit value might be used.
2026-08-10 13:26:51 +02:00
Justin M. Keyes 5287a04be4 perf(mbyte): annotate pure functions #41251 2026-08-10 04:27:49 -04:00
Justin M. Keyes 2546741d1b fix(extmarks): undo-redo of a mark explicitly moved during an edit #41252
Problem:
A mark moved by nvim_buf_set_extmark() during an edit is misplaced by
undo and redo. Only splices ("edits") are recorded, and replaying them
reproduces the shifts they caused, never the explicit set: the mark ends
up wherever the text pushed it.

Solution:
When an open undo block moves an existing mark, record both positions.
Undo restores the pre-set position, redo re-applies the set.

Partially reverts 18334a4a0c ; ExtmarkSavePos.row/col were unused
because nothing recorded an explicit move, but now `extmark_set()` does.
2026-08-10 04:21:31 -04:00
Kyle 8d406ed2ac fix(defaults): emit events on automatic background change #41242
Problem:
After #40270, events are no longer emitted from the automatic background
detection. This applies not just during startup, but also if the user
manually changes the background of their terminal.

Solution:
Set the background as normal, assuming that a normal terminal will
respond within 100 ms. Change test to match expected behavior:
- BG set during startup won't trigger user autocmds since it runs before
  any user config
- If the terminal takes longer than 100 ms to respond to initial OSC 11,
  it does trigger the OptionSet, but it is triggered through the normal
  path to ensure values like v:option_new are set #38551
- BG change after startup still triggers autocmds #41146
2026-08-10 04:17:51 -04:00