aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.c
Commit message (Collapse)AuthorAge
* feat(env)!: 'isident' does not affect $NAME parsingJustin M. Keyes2026-10-05
| | | | | | | | | | | | Problem: 'isident' decides how env var names are parsed, which is more "confusing" than "useful": - Changing 'isident' (for 'define' or "\i") can break `$NAME` expansion. - Its default byte ranges let multibyte names work on Windows (`$aあ`) but not Unix (`$é`). Solution: Ignore 'isident' when parsing env var names.
* fix(env): multibyte $VAR name may end mid-charJustin M. Keyes2026-10-04
| | | | | | | | | | | | | | | | | | | | | | | Problem: 'isident' is checked per byte (inherited from Vim), so a name can end in the middle of a multibyte char: with "192-255", `$é` (C3 A9) looks up "\xC3". - Unix: expands an env var named "\xC3", plus a stray "\xA9". - Windows: uv_os_getenv() rejects the name (invalid UTF-8), and os_getenv() logs an error. `$VAR` in expressions (get_env_len()) and cmdline completion have the same scan. Solution: `vim_isIDp()`: a multibyte char is an identifier char only if it is valid UTF-8 and 'isident' has all its bytes. Use it in expand_env_esc(), get_env_len() and cmdline completion. Names whose bytes are all in 'isident' still work, e.g. `$aあ` with the Windows default. Assert UV_EINVAL in os_getenv() and os_getenv_buf() (like os_env_exists() and os_setenv() already do): Nvim no longer passes invalid UTF-8.
* fix(cwd): :bcd completion shows non-directories #41661li2026-09-05
| | | | | | | Problem: Completion for `:bcd` shows files, not just directories. Solution: Set the ctx properly.
* 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: num -> bool patches #41375Justin M. Keyes2026-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: - 8.2.1614 also flips searchcount()'s "recompute" default to FALSE; - 8.2.1620 flips it back, so the default stays true here. vim-patch:8.2.1601: Vim9: cannot use 'true" with garbagecollect() https://github.com/vim/vim/commit/2df47310422f4a77e85de7901a5299923a1addd3 vim-patch:8.2.1602: Vim9: cannot use 'true" with getbufinfo() https://github.com/vim/vim/commit/036c2cf719e3de445779a275514030be66e26883 vim-patch:8.2.1603: Vim9: cannot use "true" with getchar() https://github.com/vim/vim/commit/c08cc72947fdfab484f53c5d9bbea662bc5a9c8f vim-patch:8.2.1604: Vim9: cannot use "true" with getcompletion() https://github.com/vim/vim/commit/d217a87755ba01fc626b1c178c682fcd05ab3a28 vim-patch:8.2.1614: Vim9: cannot pass "true" to searchcount() https://github.com/vim/vim/commit/597aaac9d2b090e0eb738ab4e2afd454b7b92393 vim-patch:8.2.1615: Vim9: cannot pass "true" to searchdecl() https://github.com/vim/vim/commit/30788d3d37a90b0702d94b7272ed26672534ba6f vim-patch:8.2.1616: Vim9: cannot pass "true" to synID() https://github.com/vim/vim/commit/fcb6d7082d563acc33866b3d3a659c32ad19a9e1 vim-patch:8.2.1617: Vim9: cannot pass "true" to win_splitmove() https://github.com/vim/vim/commit/4b9bd692bdffba03fda04f9979e25431b53e416b vim-patch:8.2.1619: Vim9: cannot pass "true" to spellsuggest() https://github.com/vim/vim/commit/7c27f337bf278babc1ccdcb66ac975f115d660b7 vim-patch:8.2.1620: searchcount() test fails https://github.com/vim/vim/commit/4140c4f3fff1a441f2837f2f911ab0f0368e412a N/A patches: vim-patch:8.2.1606: has() takes no second argument in Nvim https://github.com/vim/vim/commit/04637e243d39f791cfc97c3ce96d99ef1bf047e1 vim-patch:8.2.1610: list2str()/str2list() take no "utf8" argument https://github.com/vim/vim/commit/a48f786787e8e070c1a611146fd1f0f7e141e60a vim-patch:8.2.1611: nr2char() ignores its "utf8" argument https://github.com/vim/vim/commit/ed6a430fae72c077ec106c9620379b69cfec3035
* 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.
* vim-patch:9.2.0925: crash when getcompletiontype() gets a NULL string (#41231)zeertzjq2026-08-08
| | | | | | | | | | | | | | | | Problem: Crash when getcompletiontype()/getcompletion() gets a NULL string (dvaave2025). Solution: Do not write the NUL terminator in set_cmd_context() when the cursor column is at or past the end of the string, since the string may be a read-only literal. fixes: vim/vim#20963 closes: vim/vim#20964 Supported by AI. https://github.com/vim/vim/commit/e2dcefa0d8c03a7d2ebda67207e3d1392ae0c402 Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(options): lua closure/function optionsJustin M. Keyes2026-07-31
| | | | | | | | | | | | | | | Problem: Cannot assign Lua functions/closures to "func" ('completefunc', 'tagfun', …) or "expr" ('foldexpr', 'indentexpr', …) options. Solution: - Store "func"/"expr" options as `Callback` instead of string. - Delete oceans of copy-pasted code. - BREAKING: LuaRef returned via RPC/Vimscript is now represented as `"<Lua N: file:line>"` (like what `:map` shows) instead of `nil`. - Note: `man.vim` still uses `v:lua` string, bc it's a vimscript ftplugin. Helped-by: Lewis Russell <lewis6991@gmail.com>
* refactor(search): SearchStateJustin M. Keyes2026-07-16
|
* refactor(globals): group search state into SearchState structcarladams1299-lab2026-07-16
|
* feat(marks): :marks completion, list extmarks #40743Justin M. Keyes2026-07-15
| | | | | | | | | Problem: - No UI for listing extmarks. - `:marks` doesn't support cmdline-completion. Solution: - Add completion and extmarks support to `:marks`. - Update `get_buf_local_marks` to include the ":" (prompt-buffer) mark.
* fix(path): normalize separators (slashes) #39155tao2026-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Continue separators normalization, and try to keep it at the nvim <-> external boundary, e.g., `fn.xxx`, `api.xxx`, `:xxx` Solution: some key changes - normalize `$HOME-windows` - normalize entry points of changing directory - `nvim_set_current_dir()`, `chdir()` - normalize the named pipe - `--listen` arg, `--server` arg, `:restart` - `serverstart()`, `sockconnect()`, `serverstop()` - make `expand()` respect 'shellslash' again - clean up `did_set_shellslash` - replace `forward_slash` with `TO_SLASH` - remove obsolete `TMP_PATHSEPSTR` - remove `slash_adjust` in `do_autocmd_dirchanged`? - make `fnamemodify()` always return `/` (except when substituting separators via `:s`, `:gs` ?) Note: - these funcs still apply `slash_adjust` on return, as before: `:pwd`, `chdir()`, `exepath()`, `getcwd()` - these funcs alwarys return `/`, unlike before the normalization PRs - `getcompletion()`, `finddir()`, `findfile()` Also - clean up code, comments, formatting and tests - move `TO_SLASH` from `f_chdir` to `changedir_func` - move `TO_SLASH` from `f_bufadd` to `buflist_new` Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* 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: unify context-switching conceptsJustin M. Keyes2026-07-10
|
* vim-patch:9.2.0726: filetype detect missing from completion (#40439)zeertzjq2026-06-27
| | | | | | | | | | | Problem: ":filetype detect" is a valid command but not offered by command-line completion. Solution: Add "detect" to the completion candidates (glepnir) closes: vim/vim#20625 https://github.com/vim/vim/commit/984f29860ed4e7259de932ca7a8027e650efae7a Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.2.0683: filetype completion mishandles finished sub options (#40351)zeertzjq2026-06-21
| | | | | | | | | | | | Problem: ":filetype plugin<Tab>" gives "pluginindent" because a sub option before the cursor is treated as already given. Solution: only skip plugin and indent when followed by white space. (glepnir) closes: vim/vim#20594 https://github.com/vim/vim/commit/fe65f23aca22c40d5e919aa0e4f2909bf57d8d94 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1335: Coverity complains about Null pointer dereferences #40280Jan Edmund Lazo2026-06-16
| | | | | | | | | | | Problem: Coverity complains about Null pointer dereferences Solution: before accessing ccline->cmdbuff check that ccline is not NULL Fixes: Coverity issue 1646601 closes: vim/vim#17189 https://github.com/vim/vim/commit/362be6ba2700e864f3c755d2366a8088bead21fa Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.2.0508: completion: cannot complete user cmd :K with ↵zeertzjq2026-05-22
| | | | | | | | | | | | | | | | | | | | | | 'ignorecase' (#39944) Problem: completion: cannot complete user cmd :K with 'ignorecase' (rendcrx) Solution: Skip the short-circuit when 'ignorecase' is set (Yasuhiro Matsumoto) The set_cmd_index() short-circuit for the :k command treats ":k<X>" as ":k {X}" (mark argument), which makes ":kz<Tab>" never reach the command-name expansion path. With 'ignorecase' the same prefix on other letters (":gz<Tab>") completes a user command like :Gz, so the result is inconsistent. Skip the short-circuit when 'ignorecase' is set; default behaviour is preserved so the existing :k tests still pass. fixes: vim/vim#20241 closes: vim/vim#20275 https://github.com/vim/vim/commit/b54e57ee54f0a4e6eac74b071071a9d85326de3a Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
* feat(pack): :packupdate, :packdel commands #39693Olivia Kinnear2026-05-16
| | | | | | Define `:packupdate` and `:packdel` as separate commands instead of a unified `:pack {subcommand}` because the semantics between the two commands vary differently enough that it doesn't make sense to combine them. Additionally, `:pack! update/del` looks bad.
* vim-patch:9.2.0476: pattern completion leaks memory on alloc failures (#39767)zeertzjq2026-05-13
| | | | | | | | | | | | | Problem: copy_substring_from_pos() leaked on ga_grow() failures, expand_pattern_in_buf() leaked "match" on ga_grow() failure, fuzzy_match_str_with_pos() ignored ga_grow() failures Solution: Route failures through cleanup paths, check ga_grow before writing to ga_data (glepnir) closes: vim/vim#20203 https://github.com/vim/vim/commit/38237411e4e202a96b0efe41567505331114bfa8 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.2.0455: 'findfunc' only allows extra info for cmdline completionzeertzjq2026-05-09
| | | | | | | | | | | | Problem: 'findfunc' only allows extra info for cmdline completion, not for actually finding files (Maxim Kim, after 9.2.0451). Solution: Handle returning a list of dicts when actually finding files. Also fix crash on NULL string (zeertzjq). fixes: vim/vim#20163 closes: vim/vim#20164 https://github.com/vim/vim/commit/9694ff58fe510bf3906a7b6817429e29d5975987
* vim-patch:9.2.0451: 'findfunc' can't return extra info for cmdline completionzeertzjq2026-05-09
| | | | | | | | | | | | Problem: 'findfunc' can't return extra info for cmdline completion (Maxim Kim). Solution: Handle 'findfunc' return value in cmdline completion like that of "customlist" functions (zeertzjq). fixes: vim/vim#20155 closes: vim/vim#20158 https://github.com/vim/vim/commit/58124789aaf98fd96cd94a738633fd652a5e079a
* vim-patch:9.2.0442: completion: i_CTRL-X_CTRL-V doesn't use dict from ↵zeertzjq2026-05-05
| | | | | | | | | | | | customlist (#39614) Problem: Completion with i_CTRL-X_CTRL-V doesn't use dict from cmdline "customlist" completion. Solution: Include abbr/kind/menu/info in the completion items (zeertzjq). closes: vim/vim#20139 https://github.com/vim/vim/commit/2bfddbea47e1afa79ecd094040418abdba88bc83
* vim-patch:9.2.0433: customlist completion cannot supply pum metadata (#39584)zeertzjq2026-05-04
| | | | | | | | | | | | Problem: customlist completion cannot supply pum metadata Solution: Allow each item returned by a customlist function to be either a string or a Dict with keys "word", "abbr", "kind", "menu" and "info" (Yasuhiro Matsumoto). closes: vim/vim#20100 https://github.com/vim/vim/commit/5c700152ae23c91b6edef3fa3e7ba06d40be0f9e Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
* refactor(cmdexpand.c): deduplicate code (#39582)zeertzjq2026-05-04
|
* vim-patch:9.2.0418: wildcards in expanded env vars reinterpreted by glob ↵glepnir2026-05-02
| | | | | | | | | | | | | | | | (#39517) Problem: With $d='[dir]', `:e $d/file.txt` opens the wrong file, `:e $d/<Tab>` fails to complete, and `glob('$d/*')` returns nothing. Wildcard characters inside expanded environment variables get picked up by globbing again. Solution: Turn the 4th parameter of expand_env_esc() from a bool into a string of characters to escape in each expanded value. Callers that pass the result to wildcard expansion should include PATH_ESC_WILDCARDS in addition to " \t" (glepnir). closes: vim/vim#20053 https://github.com/vim/vim/commit/20e98ff1cc3ffc13d42579d2bf9b9567f98595a2
* vim-patch:9.2.0416: Unix: filename completion splits at space for ↵zeertzjq2026-04-30
| | | | | | | | | | | | | | | | single-file Ex commands (#39520) Problem: SPACE_IN_FILENAME is defined on most platforms but not on Unix. As a result, set_context_for_wildcard_arg() on Unix always resets the completion pattern at white space for Ex commands that take a single file argument. Solution: Drop the SPACE_IN_FILENAME ifdef (Maxim Kim) fixes: vim/vim#18411 closes: vim/vim#20090 https://github.com/vim/vim/commit/c2bda0add96a18328299e9fe6d75925049a5146a Co-authored-by: Maxim Kim <habamax@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(path): normalize path slashes on Windows #37729tao2026-04-24
| | | | | | | | | | | | | | | | | | | | Problem: On Windows, path separators may become inconsistent for various reasons, which makes normalization quite painful. Solution: Normalize paths to `/` at the entry boundaries and always use it internally, converting back only in rare cases where `\` is really needed (e.g. cmd.exe/bat scripts?). This is the first commit in a series of incremental steps. Note: * some funcs won't respect shellslash. e.g. `expand/fnamemodify` * some funcs still respect shellslash, but will be updated in a follow PR. e.g. `ex_pwd/f_chdir/f_getcwd` * uv's built-in funcs always return `\`. e.g. `uv.cwd/uv.exepath` Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:partial:9.2.0368: too many strlen() calls when adding strings to ↵zeertzjq2026-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dicts (#39237) 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: vim/vim#19999 https://github.com/vim/vim/commit/c13232699db413e735f30b5649c78a7f38a9a069 Co-authored-by: John Marriott <basilisk@internode.on.net>
* refactor(cmdexpand): duplicate code #39167Justin M. Keyes2026-04-17
| | | - Also, drop `FUNC_ATTR_UNUSED` because `xp` is actually used.
* build: update clang v21, fix warningsdundargoc2026-04-14
| | | | | - `src/nvim/ex_cmds_defs.h`: use "U" instead of "u" per `readability-uppercase-literal-suffix`
* feat(ex): add `:log` commandOlivia Kinnear2026-04-10
|
* fix(build): glibc 2.43 happenedbfredl2026-03-05
| | | | | | | | | | using the GNU compiler we just get a bunch of const warnings we can fix. clang, however, gets really upset that the standard library suddenly starts using a lot of c11 features, despite us being in -std=gnu99 mode. Basically, _GNU_SOURCE which we set is taken as a _carte blanche_ by the glibc headers to do whatever they please, and thus we must inform clang that everything is still OK.
* vim-patch:9.2.0055: memory leak in ExpandFromContext() (#38066)zeertzjq2026-02-26
| | | | | | | | | | | | | | | | | Problem: memory leak in ExpandFromContext() Solution: Free the variable (Huihui Huang). fixes: vim/vim#19500 closes: vim/vim#19505 https://github.com/vim/vim/commit/9c3279ddc39da31f3fe9c52d06cb8a9b3a06ca0e N/A patches: vim-patch:9.2.0056: memory leak in ex_substitute vim-patch:9.2.0057: memory leak in exe_newdict() vim-patch:9.2.0058: Compile error in did_set_previewpopup() vim-patch:9.2.0059: memory leak in fill_assert_error Co-authored-by: Huihui Huang <625173@qq.com>
* vim-patch:9.2.0041: Not always using GA_CONCAT_LITERALzeertzjq2026-02-22
| | | | | | | | | | | | | Problem: Not always using GA_CONCAT_LITERAL with string literals. (after: v9.2.0031) Solution: Use the GA_CONCAT_LITERAL, instead of ga_concat_len. (John Marriott) closes: vim/vim#19468 https://github.com/vim/vim/commit/fc90d8087adc607ee92262f43b8c8c0ec17dbb86 Co-authored-by: John Marriott <basilisk@internode.on.net>
* fix(messages): unwanted newlines with ext_messages #37733luukvbaal2026-02-08
| | | | | | | | | | | | | | | Problem: Newlines intended to write messages below the cmdline or to mark the start of a new message on message grid are emitted through ext_messages. This results in unnecessary newlines for a UI that has decoupled its message area from the cmdline. msg_col is set directly in some places which is not transmitted to msg_show events. Various missing message kind for list commands. Trailing newlines on various list commands. Solution: Only emit such newlines without ext_messages enabled. Use msg_advance() instead of setting msg_col directly. Assign them the "list_cmd" kind. Ensure no trailing newline is printed.
* build: ship "_core/*" as bytecode (built-into Nvim binary)Justin M. Keyes2025-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: We want to encourage implementing core features in Lua instead of C, but it's clumsy because: - Core Lua code (built into `nvim` so it is available even if VIMRUNTIME is missing/invalid) requires manually updating CMakeLists.txt, or stuffing it into `_editor.lua`. - Core Lua modules are not organized similar to C modules, `_editor.lua` is getting too big. Solution: - Introduce `_core/` where core Lua code can live. All Lua modules added there will automatically be included as bytecode in the `nvim` binary. - Move these core modules into `_core/*`: ``` _defaults.lua _editor.lua _options.lua _system.lua shared.lua ``` TODO: - Move `_extui/ => _core/ui2/`
* vim-patch:9.1.2030: inefficient use of ga_concat() (#37151)zeertzjq2025-12-29
| | | | | | | | | | | Problem: inefficient use of ga_concat() Solution: Use ga_concat_len() when length is known. (John Marriott) closes: vim/vim#19027 https://github.com/vim/vim/commit/32b801abc35b03e6f88021b29c24dd2411f7a065 Co-authored-by: John Marriott <basilisk@internode.on.net>
* vim-patch:9.1.1491: missing out-of-memory checks in cmdexpand.cJan Edmund Lazo2025-12-24
| | | | | | | | | | | | | Problem: missing out-of-memory checks in cmdexpand.c Solution: add out-of-memory checks for expand_files_and_dirs(), ExpandUserDefined() and ExpandUserList() (John Marriott) closes: vim/vim#17570 https://github.com/vim/vim/commit/3b03b435a29391ded301fa2f377141db3c8093b7 Co-authored-by: John Marriott <basilisk@internode.on.net>
* fix(lsp): tests for :lsp, rename start/stopOlivia Kinnear2025-12-16
| | | | | | - Rename :lsp start/stop to enable/disable - Move lua section of `:lsp` to `vim/_core` - Add tests
* feat(lsp): builtin :lsp commandbrianhuster2025-12-16
| | | | | | | | | | | | | Problem: - Despite [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) claims to be a "data-only" plugin, in fact it still provides some user-facing commands because they haven't been upstreamed to Nvim. Solution: - Upstream `:LspRestart`, `:LspStart` and `:LspStop` commands as `:lsp restart`, `:lsp start` and `:lsp stop` respectively. Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:8.1.1939: code for handling v: variables in generic eval file (#36312)Jan Edmund Lazo2025-10-26
| | | | | | | | | | | | Problem: Code for handling v: variables in generic eval file. Solution: Move v: variables to evalvars.c. (Yegappan Lakshmanan, closes vim/vim#4872) https://github.com/vim/vim/commit/e5cdf153bcb348c68011b308c8988cea42d6ddeb Cherry-pick get_vim_var_name() from 8.2.0149. Cherry-pick evalvars.c changes from 8.2.1788. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(cmdline): don't treat c_CTRL-D as wildmenu (#36067)zeertzjq2025-10-08
| | | | | | | | Remove WM_LIST, which was previously added in #7110, but now statusline and messages no longer interfere with each other thanks to the message grid, etc., and terminal refreshing no longer calls update_screen() directly since #9883. Tests from #7110 and #10107 still pass.
* vim-patch:9.1.1621: flicker in popup menu during cmdline autocompletionzeertzjq2025-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When the popup menu (PUM) occupies more than half the screen height, it flickers whenever a character is typed or erased. This happens because the PUM is cleared and the screen is redrawn before a new PUM is rendered. The extra redraw between menu updates causes visible flicker. Solution: A complete, non-hacky fix would require removing the CmdlineChanged event from the loop and letting autocompletion manage the process end-to-end. This is because screen redraws after any cmdline change are necessary for other features to work. This change modifies wildtrigger() so that the next typed character defers the screen update instead of redrawing immediately. This removes the intermediate redraw, eliminating flicker and making cmdline autocompletion feel smooth (Girish Palya). Trade-offs: This behavior change in wildtrigger() is tailored specifically for :h cmdline-autocompletion. wildtrigger() now has no general-purpose use outside this scenario. closes: vim/vim#17932 https://github.com/vim/vim/commit/da9c9668931e5c8ee4dc0e430898ad2d80f56862 Use pum_check_clear() instead of update_screen(). Cherry-pick Test_wildtrigger_update_screen() change from patch 9.1.1682. Co-authored-by: Girish Palya <girishji@gmail.com>
* fix(ui): forward 'rulerformat' to msg_ruler event #35707luukvbaal2025-09-13
| | | | | Problem: A 'rulerformat' not part of the statusline is not emitted through msg_ruler events. Solution: Build the message chunks to emit as a msg_ruler event.
* refactor: re