aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
Commit message (Collapse)AuthorAge
* fix(options): extend dry-run validationLewis Russell6 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: nvim_set_option_value() dry runs skip checks in did_set_* callbacks. This logic also prepares values needed to apply the option, such as tab widths or a compiled regexp. Moving the checks into validation callbacks needs a way to save that work for did_set_*. Solution: Store prepared values in optset_T so did_set_* can consume them after the option is stored. Dry runs perform the same validation, then free the prepared values without changing live state. This extends dry-run validation for: - 'cedit': reject invalid command-line window keys. - 'completeitemalign': require each completion column exactly once. - 'cursorlineopt': reject empty values and conflicting line modes. - 'encoding': accept only UTF-8 and its aliases. - 'fileencoding': reject lists and local changes with 'nomodifiable'. - 'messagesopt': require mandatory fields and enforce numeric limits. - 'spellcapcheck': return regexp errors, including under :silent!. - 'spellsuggest': reject conflicting suggestion modes. - 'varsofttabstop' and 'vartabstop': reject invalid tab widths. - 'wildmode': reject more than four completion stages. 'makeencoding' also uses the shared encoding preparation. Separating value preparation exposed a bug in 'vartabstop' and 'varsofttabstop': failed assignments could discard local tab widths, and global assignments could overwrite them. Fix this by preparing new widths separately and applying them only after a valid local assignment. AI-assisted
* refactor(api): reuse parse_cmdline in nvim_cmd #38508glepnir2026-09-22
| | | | | | | | | Problem: nvim_cmd() duplicates Ex parsing: it sets the address type and default range itself and builds the whole command line in build_cmdline_str(). Solution: Build only the range, command name and arguments, and let parse_cmdline() fill in exarg_T.
* refactor(multicursor): view/extmark/region logic #42030Justin M. Keyes2026-09-21
| | | | | | | | | | Problem: Redundant logic. Solution: Deduplicate. Also: `winrestview()` no longer forces a status-line redraw and resending `win_pos` (`win_new_width()` on unchanged width).
* vim-patch:9.2.1031: 'wildmode' list:full does not show 'wildmenu'zeertzjq2026-09-02
| | | | | | | | | | | | | | | | | Problem: With 'wildmode' set to list:full the matches are listed but the wildmenu is not shown, although it is "full" that starts wildmenu mode (zeertzjq). Solution: List the matches and show the menu, as the two behaviors in the same phase ask for. The menu is left to the phases that ask for it, so that "list" on its own still only lists (Hirohito Higashi). fixes: vim/vim#21196 closes: vim/vim#21205 https://github.com/vim/vim/commit/fa1ddffcce24f22d61608c0086e55adadd1d2c11 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.2.1024: 'wildmode' list:full does not complete first matchzeertzjq2026-09-02
| | | | | | | | | | | | | | | | | Problem: With 'wildmode' set to list:full, matches are listed but the first match is not completed on the first Tab press (rendcrx). Solution: Do not suppress selection when list and full are active in the same completion phase. Add regression tests for file completion, comma-separated phases and noselect precedence (Seunghee Kim). fixes: vim/vim#19532 related: vim/vim#18088 closes: vim/vim#21181 https://github.com/vim/vim/commit/54c988c6c57bff3db35d7df1dcacd484e3d9610c Co-authored-by: SeungheeKim <ksh368@naver.com>
* refactor(input): exec stuffed keys eagerlyJustin M. Keyes2026-08-29
| | | | | | | | | | | | | | | | | | | Problem: The Vim "stuff" concept breaks the ability to reason about the call stack and thus the boundaries of a `CmdAtom`: a stuffed translation ("x" => "dl") defers to the main loop. This "continuation" must be modeled in `CmdAtom`, by checking global flags at undefined times, during undefined circumstances. Solution: - After a stuffed "translation", eagerly execute the stuff buffer (`exec_stuffed()`). - Delete the CmdAtom "continuation" junk. Note: - op_colon runs its cmdline "nested", but that's fine because operators already nest interactive sessions there (op_change runs edit()), and the cmdline is frameless so the operator's frame can own/capture it.
* feat(cmdatom): mappings capture continuationJustin M. Keyes2026-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: A mapping that ends mid-operation (`nnoremap ,D d`) emits a content-free "mapping" atom plus a `pending` field, and the "continuation" motion arrives as a sibling atom. Consumers must stitch the two together (which has broken cases, e.g. Insert-opening mappings (",i") lose their session entirely). - ",i": the session atom is dropped bc the mapping RHS is consumed before the session starts (typebuf_maplen()==0), so atom_is_user_input()=false. - ":normal"-in-opfunc: the opfunc internal "v..y" session (a) became kVatomTyped just because the deferred composite was open, masking the real operator capture via atom_captures, and (b) its nested frames re-derived the outer redo. - "Motion" based on `moved=true`, has false negatives. - `CmdAtom.remap` is unnecessary, and clutters the docs/usage. Solution: - Introduce `frame_id` to identify CmdFrames. - Classify `type=motion` better, via `NV_MOTION` flag on the `nv_cmds` table. - Drop `CmdAtom.pending`, `CmdAtom.remap`. - Defer atom_composite_end() at the clock edge while an operator is pending, Visual is active, or `restart_edit` is set: the composite keeps collecting, so the continuation is captured in the mapping atom. - ",i": Now an open composite counts as user input. - ":normal"-in-opfunc: Now handled correctly. - `remap` is now decided by `composite.payload || 0 subatoms`. atom_payload_mark() records the read the resolution never captures. - `toplevel` is now decided by `CmdFrame.parent == NULL`. before/after: INPUT BEFORE AFTER --------------------------------------------------------------------- ,D w {mapping lhs=,D pending=operator} {operator lhs=,Dw keys=dw} + {operator keys=dw} ysiw" {mapping lhs=ys pending=operator} {operator lhs=ysiw" keys=g@iw"} + {operator lhs=g@iw"} ,v d {mapping pending=visual} {visual lhs=,vd keys=viwd} + {visual lhs=viwd} ,i XY<Esc> {normal keys=i lhs=,iXY<Esc>} {insert keys=1iXY<Esc> text=XY}
* feat(input)!: CmdAtom event #41297Justin M. Keyes2026-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* refactor(ex_cmds): use function arguments for magic behaviorbfredl2026-08-10
| | | | | | | | | | | | 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.
* feat(cwd): support explicit chdir (:bcd/:tcd/…) in temp contextJustin M. Keyes2026-08-06
| | | | | | | | | | | | | | | | | | Problem: - Explicit `:bcd` (etc.) persists from `nvim_buf_call()` but not from an autocmd handler targeting a hidden buf (`LspAttach`, `TermRequest`, …), which needs a `vim.schedule()` workaround. - `vim._with()` is supposed to work as a "sandbox", discarding side-effects, but it leaks CWD changes: `:lcd` from a `win` context, any chdir from a visible-buffer context. Solution: - Explicit :cd/:tcd/:bcd during a temp context persists by default. - "Ambient" directory changes ('autochdir', existing win-local CWD, etc.) are still undone, as before. - Add `kCtxKeepDirs`: snapshot/restore the target's full CWD state (w/b/tp-local, global, cwd). Used by `vim._with()` and `'inccommand'`, which must not leak state.
* refactor(options): drop OptVal, use ObjectJustin M. Keyes2026-07-29
| | | | | | | | | | | | | Problem: The object subsystem has an intermediate representation for no real reason. Besides the code cost, this also adds an extra (api <=> OptVal) conversion step, which is a (small) perf cost. Solution: We already have `Object`, so use it instead. - drop `OptVal`, `OptValData`, `OptValType`, and related boilerplate. - add `kObjectTypeUnset`.
* refactor(exmode): Ex-mode as cmdwin + Lua #40991Justin M. Keyes2026-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: POSIX-compatible Ex-mode requires special-cases all over the codebase to match various quirks that don't actually matter to users. - The main utility of *interactive* Ex-mode is its REPL behavior, and that can be achieved with `cmdwin`, which also gains extra UX benefits. - The main utility of *non-interactive* `nvim -es` is for shell scripting, where Ex-mode quirks are mostly unhelpful (e.g. the "Entering Ex mode" message). Solution: - Reimplement *interactive* Ex-mode as a "persistent, insert-mode cmdwin" in Lua. - "nvim -e/-E" is simply an alias to "gQ". - Reframe *non-interactive* Ex-mode (`nvim -es`) as "script mode". - Drop POSIX Ex-mode quirks. Improvements: - "nvim -V1 -es" output ends with a final newline! - "nvim -V1 -es" no longer shows the "Entering Ex mode" msg. (This was pointless noise, unwanted for scripting purposes.) - stdin is no longer typeahead. Scripts (":lua io.read()") can read stdin as data. - Empty line is a no-op: a stray blank line no longer moves the cursor (deviates from POSIX ex "+1"), no longer exits 1 at EOF (E501). Preserved behavior: - cursor starts at "$" - mode()=="cv" (for non-interactive) - multiline commands (:append/:function/heredoc pull continuation lines) - bare-range print - :print=>stdout - -V1=>stderr - CRLF input - continue-after-error and exit codes Dropped (regressed) POSIX behavior (non-interactive): - Event loop only ticks while/between commands, not while blocked waiting for a stdin line. - ":g/pat/visual...Q" - input()/getchar()/":s/x/y/c" no longer consume stdin lines as answers: Nvim stops at end-of-input, skipping the rest of the script, exit 0. Use ":lua io.read()" instead. - If users care about this they should use interactive Ex-mode (`gQ`). - ":@r" stops at end of the register instead of continuing to read cmdline input from stdin.
* feat(options): schema, "dict" options, messagesJustin M. Keyes2026-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Options parsing is still painful for dict-style options. Solution: schema-maxxing => better `opt:get()` (will be the basis for `vim.o()`), unified (and more-detailed) err msgs. - Drop bespoke structure-builder in `_core/options.lua`. - Define `schema` for all non-primitive options (except 'guicursor' and statusline-style options); generate reified keysets `OptKeyDict`). - Generate 'fillchars' => `fcs_tab`, 'listchars' => `lcs_tab`. - `nvim_set_option_value`: - Return the improved structures. Also from `vim.opt.x:get()`. - Eliminate api <=> lua roundtrip, centralize option structure handling. - Improve/unify errors. - Bump ERR_BUFLEN 80 → 256 so the "one of" list isn't truncated. - Eliminate old 'diffopt' order-dependence (`iwhiteall` before `iwhite`) Error samples: Typed-key path (opt_strings_check → diffopt/mousescroll/breakindentopt): E474: Unknown item 'foo' E474: 'context' requires a number E474: 'ver' number is out of range E474: 'algorithm' must be one of: myers, minimal, patience, histogram E474: 'filler' does not take a value Related: - #31084 - #34661 - #31820 - #14739 - #20107 - fix #18875 - :get() returns `{ sbr = true, shift = '3' }` (reified-keyset) instead of `{'sbr', 'shift:3'}` - Setting via table now works too. `object_as_optval_for` `is_map` now recognizes struct options. - fix #30296 - instead of `E474: Invalid argument`, errors now look like: ``` E474: Invalid value 'x', expected one of: single, double: ambiwidth=x E474: Unknown item 'foo': diffopt=foo E474: 'context' requires a number: diffopt=context:x ``` simplify `win_float_parse_option` from #26799.
* fix(lua): vim.keycode cleanup #40817Justin M. Keyes2026-07-18
|
* feat(lua): vim.keycode() gets structured parse result #38636altermo2026-07-18
| | | | | | | | | | | | | | | | | Problems: 1. Can't get individual parts of a key-chord separately: modifiers, key. 2. Can't separate a key-combo into individual key-chords. Solution: Enhance `vim.keycode()` to optionally return a structured parse result as a list of key-chords: - `key_raw` the key-chord (problem 2) - `mod` the modifiers of `key_raw` (problem 1) - `key_orig` the key part of the key-chord, only here if differing from `key` (this doesn't solve any of the above mentioned problems, but it may provide useful and it's (in terms of code) free) - `key` a normalized version of `key_orig` (solving problem 1), example(the first is `key_orig` and second is `key`): `lt` and `<`, `Bar` and `|` (in `<C-Bar>`)
* refactor(search): SearchStateJustin M. Keyes2026-07-16
|
* refactor(globals): group search state into SearchState structcarladams1299-lab2026-07-16
|
* refactor(insert): rename edit.c => insert.c #40705Justin M. Keyes2026-07-12
| | | | | | | | | | Problem: - `edit.c` is an unnecessarily misleading and less-discoverable name than `insert.c`. - Numerous insert-mode related things are named with a `ins_` prefix. - There is already a `insexpand.c` module... Solution: Rename `edit.c` => `insert.c`.
* refactor(input): rename getchar.c => input.c #40698Justin M. Keyes2026-07-12
| | | | | | | | | | | | Problem: `getchar.c` is a quirky name and doesn't align with our existing `os/input.c` and `tui/input.c` modules, which encompass the same topic at different layers. Solution: Rename `getchar.c` => `input.c` for discoverability. Introduce `dialog.c` for functionality related to showing confirm prompts, dialogs, etc.
* refactor(ctx): drop aucmd_prepbuf/aucmd_restbuf #40692Justin M. Keyes2026-07-11
|
* refactor(cmdpreview): lift undo-checkpoint codeJustin M. Keyes2026-07-10
| | | | | This is a mechanical lift of undo save-and-restore logic into... the module that owns undo.
* refactor(api): drop CmdParseInfo indirection #40657Justin M. Keyes2026-07-09
| | | Just Say No to indirection.
* refactor(lua): rename nlua_call_typvalJustin M. Keyes2026-07-06
|
* vim-patch:9.2.0743: string macros silently accept a size of the wrong type ↵zeertzjq2026-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | (#40470) Problem: Several string and memory wrapper macros cast their size argument to size_t although the wrapped function's prototype already declares that parameter size_t; such casts silence the warning a compiler would otherwise give when a value of the wrong type, such as a pointer, is passed as the size. Solution: Where the wrapped function's prototype already declares the parameter size_t, remove the cast so that a size argument of the wrong type can be reported at compile time (K.Takata, Shane Harper). From gcc 14 on, -Wint-conversion is an error by default. With gcc, passing a signed value where size_t is expected triggers -Wsign-conversion, but the check is off by default and the build already emits many such warnings. related: vim/vim#20642 closes: vim/vim#20656 https://github.com/vim/vim/commit/7f122f9effba51adc107909b8ca4d9b220c2bfaf Co-authored-by: Shane Harper <shane@shaneharper.net> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix(cmdwin): implement Enter/Ctrl-C as builtinsJustin M. Keyes2026-06-26
| | | | What echasnovski wants, echasnovski gets.
* fix(cmdwin): duplicate line in historyJustin M. Keyes2026-06-26
| | | | | | | | | Problem: After ctrl-f from the cmdline, the last 2 lines of cmdwin are redundant. Solution: In `open_cmdwin`, clear the live cmdline so that unwinding it (via Ctrl_C) does not add it to history.
* feat(cmdwin): implement cmdwin as a normal buf+winJustin M. Keyes2026-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cmdwin (the `:q` cmdline buffer) has various limitations which require special-casing all over the codebase. Besides complicating the code, it also breaks async plugins if they try to create buffers/windows after some work is done, if the user happens to open cmdwin at the wrong the moment: Lua callback: …/guh.nvim/lua/guh/util.lua:531: E11: Invalid in command-line window; <CR> executes, CTRL-C quits stack traceback: [C]: in function 'nvim_buf_delete' …/guh.nvim/lua/guh/util.lua:531: in function <…/guh.nvim/lua/guh/util.lua:526> Solution: Just say no to "inception". Reimplement cmdwin as a normal buffer+window. All of the cmdwin contortions (in both core, and innocent plugins) exist literally only to support "inception": recursive cmdwin-in-cmdline-things, like `<c-r>=`, `/`, search-during-substitute, `:input()`, etc. So we just won't support that (though I have a potential plan for that later, which I call "modal parking lot"). The benefit is that plugins, and core, no longer have to care about cmdwin. BONUS: - mouse-drag on vertical separators works (it only worked for horizontal/statusline before) - inccommand-in-cmdwin now works correctly, for free (thus don't need #40077). POTENTIAL FOLLOWUPS - Drop `CHECK_CMDWIN` ("E11: Invalid in command-line window"), allow chaos. - Unify `BUFLOCK_OK` / `LOCK_OK` ? DESIGN: - Eliminate lots of C globals, `EX_CMDWIN`, etc. - `text_locked()` no longer reports true for cmdwin. - cmdwin = a normal window with 'winfixbuf', 'bufhidden=wipe', 'buftype=nofile'. Invariants come from those options rather than special cases throughout the codebase. - `nv_record` for q:/q//q? calls Lua `nlua_call_vimfn("vim._core.cmdwin", …)`. No `K_CMDWIN` / cmdline-reader detour. - `cedit_key` (`c_CTRL-F`) schedules a deferred event that calls `vim._core.cmdwin.open(type, content, pos)` and returns `Ctrl_C` so the in-flight cmdline cancels. Reader state is not serialized; instead the captured `(type, line, col)` is replayed via `nvim_feedkeys(type..line.."<CR>", "nt", …)` after user confirms. - On confirm/cancel: `<CR>` / `<C-C>` calls into Lua which closes the window and re-feeds the cmdline. BREAKING CHANGES: - Expression-register cmdline (`<C-R>=` from insert-mode) no longer supports cmdwin. Same applies to `input()` / `inputlist()` (already covered by `text_locked`). - Usage of cmdwin in macros/mappings will probably break (assuming they ever worked).
* fix(cmdline): encode no prompt in cmdline_show.hl_idLuuk van Baal2026-06-22
| | | | | | Problem: Unable to distinguish an empty prompt from no prompt in cmdline_show event. Solution: Set cmdline_show.hl_id to -1 when no prompt is active.
* fix(cmdline): avoid redraw loop after wrapped line #40240Sam Reynoso2026-06-19
| | | | | | | | | | | Problem: A wrapped command line and screen width may be redrawn repeatedly after calls to `redrawstatus` from lua. Solution: redrawcmd() redraws the command line, but msg_clr_eos() may invalidate cmdline_was_last_drawn during the redraw process. Restore cmdline_was_last_drawn when redrawcmd() completes. Co-authored-by: Sam Reynoso <sam@codeoutpost.com> Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* vim-patch:9.2.0676: MS-Windows: cannot switch to a buffer with '%' in its ↵zeertzjq2026-06-19
| | | | | | | | | | | | | | | | | | | | name (#40315) Problem: On MS-Windows it is not possible to switch to a buffer by name with ":b" (including via command-line completion) when the buffer name contains '%'. Solution: Do not escape '%' and '#' for the ":buffer" command on MS-Windows. Since ":buffer" has no EX_XFILE these are not expanded, and escaping them as "\%"/"\#" makes buffer name matching fail when '%'/'#' is in 'isfname' (the backslash is treated as a path separator). fixes: vim/vim#20529 closes: vim/vim#20548 https://github.com/vim/vim/commit/1a96e07bf6ba46f4b6f50a861d755d0fbc89dabb Co-authored-by: Hirohito Higashi <h.east.727@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* vim-patch:9.2.0596: cmdline completion popup cannot be scrolled with the ↵zeertzjq2026-06-08
| | | | | | | | | | | | | | | | | | | mouse (#40142) Problem: In command-line completion with a popup menu ('wildoptions' contains "pum"), the info popup shown next to the menu could not be scrolled, unlike the Insert mode completion info popup which scrolls with the mouse wheel. Solution: When the mouse pointer is on top of the info popup, scroll it with the mouse wheel in command-line mode as well, without closing the completion popup menu. closes: vim/vim#20146 closes: vim/vim#20418 https://github.com/vim/vim/commit/96dbab257a881ee4a552e1acf62e7d4168dc444a Co-authored-by: Hirohito Higashi <h.east.727@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: simplify aucmd_restbuf usage #39879Justin M. Keyes2026-05-19
| | | | | | | | Problem: `aucmd_restbuf` must be guarded in case `aucmd_prepbuf` wasn't called. Solution: Update `aucmd_restbuf` to be a no-op if `aucmd_prepbuf` wasn't called. This requires `aco` to be zero-initialized.
* fix(events): trigger WinScrolled during 'incsearch' #39308Daigo Yamashita2026-05-05
| | | | | | | | | | | Problem: With 'incsearch' enabled, the window can scroll while typing a search pattern, but WinScrolled is not triggered until the next user action in Normal mode. The event is effectively skipped for every scroll that happens while the search prompt is still open. Solution: Call may_trigger_win_scrolled_resized() after update_screen() in may_do_incsearch_highlighting() and finish_incsearch_highlighting().
* vim-patch:partial:9.2.0423: popup: wrapped cmdline truncated with ↵zeertzjq2026-05-02
| | | | | | | | | | | | | | | | | | | | | | wildoptions=pum (#39553) Problem: popup: wrapped cmdline truncated with wildoptions=pum Solution: Call msg_starthere() in redrawcmd() to reset lines_left before each redraw (Yasuhiro Matsumoto). redrawcmd() leaves lines_left at its previous value, which decrements across successive redraws (e.g. when wildtrigger() refreshes the popup on every keystroke) until 0, after which msg_no_more aborts drawing the wrapped cmdline. Call msg_starthere() to reset it. related: vim/vim#20081 https://github.com/vim/vim/commit/587447ec64ffd9e6eaba329ffd9d778159ea6e32 The problem mentioned in the PR cannot be reproduced in Nvim. It's not clear if this change will solve or cause any problems in Nvim, so let's first try it without adding the test. Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
* vim-patch:9.2.0417: completion: no support for "noinsert" with 'wildmode' ↵glepnir2026-04-30
| | | | | | | | | | | | | (#39516) Problem: completion: no support for "noinsert" with 'wildmode' and commandline completion Solution: Add "noinsert" value to the 'wildmode' option, mirroring 'completeopt' "noinsert" behaviour (glepnir). fixes: vim/vim#16551 closes: vim/vim#20080 https://github.com/vim/vim/commit/af494af5ff188d976073cbc049249614edffa4bf
* fix(cmdline): avoid 'incsearch' recursion after redraw #39303luukvbaal2026-04-22
| | | | | | | Problem: A vim.ui_attach() callback that redraws to show a 'verbose' regex message during 'incsearch' results in recusive redrawing. Solution: Check that curwin was redrawn instead of just any window when determining if 'incsearch' highlighting was cleared.
* fix(incsearch): support `c_CTRL-{G,T}` with an offset (#39097)Barrett Ruth2026-04-22
| | | | | | | | | | | | | | vim-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: vim/vim#19991 closes: vim/vim#19998 https://github.com/vim/vim/commit/c62342e5cfc339a87c1eb40ef34b2b31070d72a6
* vim-patch:9.2.0346: Wrong cursor position when entering command line window ↵zeertzjq2026-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | (#39072) Problem: Wrong cursor position when entering command line window Solution: Add check_cursor() command to verify the cursor position (Hirohito Higashi). When opening the command-line window with CTRL-F after typing a command that fills the screen width, the cursor was placed past the end of the line. Add check_cursor() after setting State to MODE_NORMAL so the cursor is adjusted to the last character. Also fix the cmdwin prefix character (e.g. ':') being drawn on wrapped continuation rows. Draw an empty space instead so that the text alignment is preserved. closes: vim/vim#19964 https://github.com/vim/vim/commit/c4fe1e958a2051d443abe072c8a5366a887da9b3 Cherry-pick Test_wildmenu_pum() changes from patch 9.1.1995. Co-authored-by: Hirohito Higashi <h.east.727@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(cmdline): avoid Ex-mode NULL cmdline_block event #39043luukvbaal2026-04-14
| | | | | | Problem: Attempting to emit cmdline_block event with NULL cmdbuff after <C-\><C-N> in Ex-mode. Solution: Don't emit cmdline_block event when cmdbuff is NULL.
* fix(cmdline): 'inccommand' preview after setcmdline() #38795luukvbaal2026-04-06
| | | | | |