aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | | docs: miscdundargoc2025-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Axel <axelhjq@gmail.com> Co-authored-by: Colin Kennedy <colinvfx@gmail.com> Co-authored-by: Daiki Noda <sys9kdr@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Jean-Jacq du Plessis <1030058+jj-du-plessis@users.noreply.github.com> Co-authored-by: Juan Giordana <juangiordana@gmail.com> Co-authored-by: Lincoln Wallace <locnnil0@gmail.com> Co-authored-by: Matti Hellström <hellstrom@scm.com> Co-authored-by: Steven Locorotondo <steven.locorotondo@justeattakeaway.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: ifish <fishioon@live.com>
| * | | vim-patch:9.1.1001: ComplMatchIns highlight hard to read on light background ↵zeertzjq2025-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31958) Problem: ComplMatchIns highlight hard to read on light background (after v9.1.0996) Solution: define the highlighting group cleared, it should be configured in colorschemes separately (glepnir) closes: vim/vim#16414 https://github.com/vim/vim/commit/ad409876d9cf7e565f99c5e21b9e2e400a83a4d4 Co-authored-by: glepnir <glephunter@gmail.com>
| * | | vim-patch:9.1.0996: ComplMatchIns may highlight wrong text (#31931)glepnir2025-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ComplMatchIns may highlight wrong text Solution: don't highlight in case of fuzzy match, skip-highlight when not inserting anything (glepnir) closes: vim/vim#16404 https://github.com/vim/vim/commit/e890887b8052561ac5f8dce218e578ed28599cc6
| * | | fix(messages): attaching/detaching ext_messages causes asserts #31952luukvbaal2025-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Assert hit related to message kind, which is reset after a ext_messages UI is forcibly detached, so the assertion is expectedly false. Assert hit related to message grid variables after an ext_messages UI attaches while message grid is scrolled. Solution: Don't check message kind assertion if no ext_messages UI is attached. Flush message grid when first/last ext_messages UI attaches/detaches.
| * | | refactor(api): deprecate nvim_notify #31938Justin M. Keyes2025-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The `nvim_notify` API (note: unrelated to `vim.notify()` Lua API) was not given any real motivation in https://github.com/neovim/neovim/pull/13843 There are, and were, idiomatic and ergonomic alternatives already. Solution: Deprecate `nvim_notify`.
| * | | fix(decor): set invalid flag for end of invalidated paired marksLuuk van Baal2025-01-10
| | | |
| * | | docs: misc #31867Justin M. Keyes2025-01-09
| | | |
| * | | fix(api): deprecated API nvim_get_option does not validate option name #31919Famiu Haque2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Deprecated API `nvim_get_option()` doesn't validate the option name, which leads to an assertion failure. Solution: Validate option name in `nvim_get_option()`. Ref: #31894
| * | | Merge #31900 from luukvbaal/nvim_echoJustin M. Keyes2025-01-09
| |\ \ \ | | |/ / | |/| |
| | * | feat(api): deprecate nvim_out/err_write(ln)Luuk van Baal2025-01-09
| | | |
| | * | feat(api): add err field to nvim_echo() optsLuuk van Baal2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: We want to deprecate `nvim_err_write(ln)()` but there is no obvious replacement (from Lua). Meanwhile we already have `nvim_echo()` with an `opts` argument. Solution: Add `err` argument to `nvim_echo()` that directly maps to `:echoerr`.
| * | | Merge pull request #31844 from bfredl/iter_crashbfredl2025-01-09
| |\ \ \ | | | | | | | | | | fix(decoration): fix crash when on_lines decor provider modifies marktree
| | * | | fix(decoration): fix crash when on_lines decor provider modifies marktreebfredl2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a "on_lines" callback changes the structure of the marktree, the iterator (which is used for an entire window viewport) might now point to invalid memory. Restore the iterator to the beginning of the line in this case. fixes #29484
| * | | | fix(terminal): don't crash on unprintable charsbfredl2025-01-09
| | | | | | | | | | | | | | | | | | | | fixes #31897
| * | | | vim-patch:9.1.0997: too many strlen() calls in drawscreen.c (#31927)zeertzjq2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in drawscreen.c Solution: refactor drawscreen.c and remove calls to strlen(), make get_keymap_str() (in screen.c) return string length instead of TRUE/FALSE (John Marriott). https://github.com/vim/vim/commit/a21240b97debea2e087aee6ad1488b5f075d1259 Co-authored-by: John Marriott <basilisk@internode.on.net>
| * | | | Revert "refactor(options): set option value for non-current context ↵zeertzjq2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | directly" (#31924) Reverts #31112
| * | | | vim-patch:partial:9.1.0882: too many strlen() calls in insexpand.c (#31490)zeertzjq2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in insexpand.c Solution: Refactor insexpand.c and reduce number of calls to STRLEN(), fix a warning get_next_filename_completion(), add new function ins_compl_leader_len() (John Marriott) closes: vim/vim#16095 https://github.com/vim/vim/commit/5e6ea92b2c58cbfc642d7e35bd717f99aa2e1e53 Co-authored-by: John Marriott <basilisk@internode.on.net>
| * | | | vim-patch:1718e7d: runtime(vim): Update base-syntax, improve ex-bang ↵zeertzjq2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | matching (#31922) Always match ex-bang explicitly rather than incidentally as the ! operator. fixes: vim/vim#16221 closes: vim/vim#16410 https://github.com/vim/vim/commit/1718e7d07e391571ac81c507a746b3bc7a7e2024 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
| * | | | Merge pull request #31112 from famiu/refactor/options/set_option_forLewis Russell2025-01-08
| |\ \ \ \ | | | | | | | | | | | | refactor(options): set option value for non-current context directly
| | * | | | refactor(options): set option value for non-current context directlyFamiu Haque2024-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently, we use `switch_option_context` to temporarily switch the current option context before setting an option for a different buffer / window. This is not ideal because we already support getting and setting option values for non-current contexts in the underlying implementation. Solution: Set option value for non-current context by passing the context directly to the lower level functions. Also introduce a new `OptCtx` struct to store option context information, this will scale much better if we add more option scopes and other context information in the future.
| | * | | | refactor(autocmd): allow specifying window for autocmd contextFamiu Haque2024-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently we can only specify a buffer to use for an autocmd context through `aucmd_prepbuf()`, which finds a window that uses that buffer in the current tabpage, or creates an autocmd window. This means it's not possible to actually specify a window to use for an autocmd. Solution: Add an `aucmd_prepbuf_win()` function which also takes a window as a parameter and uses it for the autocmd. If the window is not provided, then it behaves similarly to `aucmd_prepbuf()`
| * | | | | fix(api): nvim_set_decoration_provider callback return type #31912notomo2025-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: incorrect return type doc causes luals `Annotations specify that at most 0 return value(s) are required, found 1 returned here instead.` diagnosis Solution: correct return type doc
| * | | | | fix(api): crash on invalid buffer to nvim_buf_del_user_command (#31908)zeertzjq2025-01-08
| | | | | |
| * | | | | fix(highlight): make TablineSel more noticeable with 'notermguicolors' #31905Evgeni Chasnovski2025-01-07
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Linking `TablineSel` to `Normal` makes it more noticeable with `notermguicolors` but less so with `termguicolors` (compared to using bold text in both cases). Solution: use bold text with `termguicolors` and regular with `notermguicolors`.
| * | | | fix(highlight): make `TablineSel` more noticeable #31896Jared Baur2025-01-07
| | | | | | | | | | | | | | | | | | | | The default `TablineSel` highlighting makes it subjectively difficult to differentiate the selected tab from unselected ones.
| * | | | refactor: adopt vtermdundargoc2025-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have changed too much to consider it a mere bundled dependency (such as unicode handling in e3bfcf2fd4a4ebf00b104b082cfe83c8144a842d), and can consider it our own at this point.
| * | | | vim-patch:9.1.0991: v:stacktrace has wrong type in Vim9 scriptzeertzjq2025-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: v:stacktrace has wrong type in Vim9 script. Solution: Change the type to t_list_dict_any. Fix grammar in docs. (zeertzjq) closes: vim/vim#16390 https://github.com/vim/vim/commit/6655bef33047b826e0ccb8c686f3f57e47161b1c
| * | | | vim-patch:9.1.0984: exception handling can be improvedzeertzjq2025-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: exception handling can be improved Solution: add v:stacktrace and getstacktrace() closes: vim/vim#16360 https://github.com/vim/vim/commit/663d18d6102f40d14e36096ec590445e61026ed6 Co-authored-by: ichizok <gclient.gaap@gmail.com> Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
| * | | | vim-patch:9.1.0993: New 'cmdheight' behavior may be surprising #31892luukvbaal2025-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Although patch 9.1.0990 fixed a real problem/inconsistency, it also introduced new behavior that may break BWC and/or be unexpected. Before 9.1.0990, window commands could make the topframe smaller (without changing 'cmdheight'; quirk that is now fixed), but did not allow extending the topframe beyond the 'cmdheight' set by the user. After 9.1.0990, the user can reduce the 'cmdheight' below the value they set explicitly, through window commands, which may lead to confusion. (aftere v9.1.0990) Solution: Store the value explicitly set by the user and clamp the 'cmdheight' when resizing the topframe. This also applies to dragging laststatus, which in contrast to window commands _did_ allow reducing the 'cmdheight' to values below the one set by the user. So with this patch there is still new behavior, but I think in a way that is less surprising. While at it, also fix a Coverity warning, introduced in v9.1.0990 (Luuk van Baal) https://github.com/vim/vim/commit/c97e8695353565d6b20adffa48aad47f6e09967f
| * | | | fix: fix incorrect search codedundargoc2025-01-06
| | | | |
| * | | | "nvim -es": disable shada #21723Justin M. Keyes2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `nvim -es` (and `nvim -Es`) is the recommended way to non-interactively run commands/vimscript. But it enables shada by default, which is usually not wanted. Solution: - Disable shada by default for `nvim -es/-Es`. This can be overridden by `-i foo` if needed. - Do NOT change the 'loadplugins' default. - User config + packages _should_ be enabled by default, for both `nvim -es` and `nvim -l`. Else any Lua packages you have can't be accessed without `-u path/to/config`, which is clumsy. - Use-cases: ``` nvim --headless "+Lazy! sync" +qa would become: nvim -es "+Lazy! sync" nvim --headless +PlugInstall +qall would become: nvim -es +PlugInstall ``` - Opt-out (`--clean` or `-u NONE`) is much easier than opt-in (`-u path/to/config`). - User config/packages are analogous to pip packages, which are expected when doing `python -c ...`. related: 7c94bcd2d77e2e54b8836ab8325460a367b79eae related: ddd0eb6f5120a09b97867d2561ea61309038ccd2
| * | | | fix(cmdline): always show cmdline when it is a prompt #31866luukvbaal2025-01-05
| | | | | | | | | | | | | | | Cmdline prompts should ignore `cmd_silent`.
| * | | | fix(api): nvim__complete_set requires completeopt=popup #31177glepnir2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If completeopt does not include "popup" flag, nvim__complete_set still auto-creates a floating preview window. Solution: Fail if completeopt does not include the "popup" flag.
| * | | | fix(popup): wrong extmark data sync when lines changed in popup preview #30246glepnir2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: when popup preview buffer has filetype like markdown and ts is enabled, the extmark clean and update not correct, if add the extmark sync there has lots of duplicate codes like nvim_buf_set_lines. Solution: use nvim_buf_set_lines api internally to set info to popup preview buffer.
| * | | | vim-patch:9.1.0990: Inconsistent behavior when changing cmdheight (#31830)luukvbaal2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Inconsistent behavior when changing cmdheight by resizing the topframe through wincmds and dragging laststatus. Changing cmdheight by resizing the topframe does not trigger OptionSet. Solution: Consolidate logic for changing the cmdheight, set the option value to handle side-effects (Luuk van Baal) https://github.com/vim/vim/commit/e15cbc1af47e9dea90448c714eb4908e5d4302fc vim-patch:9.0.0187: command line height changes when maximizing window height Problem: Command line height changes when maximizing window height. Solution: Do not change the command line height. (closes vim/vim#10885) https://github.com/vim/vim/commit/96bde99bf890acd9952863a02c1d15edca2000e1
| * | | | test: spawn_wait() starts a non-RPC Nvim processJustin M. Keyes2025-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Can't use `n.clear()` to test non-RPC `nvim` invocations. So tests end up creating ad-hoc wrappers around `system()` or `jobstart()`. Solution: - Introduce `n.spawn_wait()` - TODO (followup PR): Rename `n.spawn()` and `n.spawn_wait()`. It's misleading that `n.spawn()` returns a RPC session...
| * | | | fix(grid): grid_line_start NULL access with 'redrawdebug'Justin M. Keyes2025-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: This test causes a null pointer dereference: local proc = n.spawn_wait('-l', 'test/functional/fixtures/startup-fail.lua') RUN T1565 startup -l Lua Lua-error sets Nvim exitcode: 241.00 ms OK ==================== File …/build/log/asan.13763 ==================== = …/src/nvim/grid.c:389:12: runtime error: null pointer passed as argument 1, which is declared to never be null = /usr/include/string.h:61:62: note: nonnull attribute specified here = 0 0x55cc2d869762 in grid_line_start …/src/nvim/grid.c:389:5 = 1 0x55cc2d8717ca in grid_clear …/src/nvim/grid.c:618:5 = 2 0x55cc2dbe0f6f in msg_clr_eos_force …/src/nvim/message.c:3085:3 = 3 0x55cc2dbbbdec in msg_clr_eos …/src/nvim/message.c:3061:5 = 4 0x55cc2dbbae2c in msg_multiline …/src/nvim/message.c:281:9 = 5 0x55cc2dbba2b4 in msg_keep …/src/nvim/message.c:364:5 = 6 0x55cc2dbc4992 in emsg_multiline …/src/nvim/message.c:773:10 = 7 0x55cc2dbc5d43 in semsg_multiline …/src/nvim/message.c:824:9 = 8 0x55cc2d9c5945 in nlua_error …/src/nvim/lua/executor.c:158:5 = 9 0x55cc2d9c89fd in nlua_exec_file …/src/nvim/lua/executor.c:1862:5 = 10 0x55cc2d9f4d69 in main …/src/nvim/main.c:637:19 = 11 0x7f319b62a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 = 12 0x7f319b62a28a in __libc_start_main csu/../csu/libc-start.c:360:3 = 13 0x55cc2ced0f64 in _start (…/build/bin/nvim+0xc48f64) (BuildId: 309c83f8d74297c89719dae9c271dd8ec23e64c3) Cause: The tests use `redrawdebug=invalid` by default, but `default_grid_alloc` skips calling `grid_alloc` when not `full_screen`. Solution: Check for `full_screen`.
| * | | | fix(messages): better formatting for ext_messages #31839luukvbaal2025-01-03
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Message grid newline formatting based on `msg_col` is not utilized with ext_messages. Solution: Increment `msg_col` with the cell width of the chunk. Allowing message code that uses `msg_col` to determine when to place a newline to do so. E.g. when the message goes beyond `Columns`; this is not necessarily where the ext_messages implementation would want to place a newline, but it is a best guess. Message parsing and manipulation is still possible.
| * | | Merge pull request #31635 from bfredl/vtermpiratesbfredl2025-01-03
| |\ \ \ | | | | | | | | | | feat(terminal): support grapheme clusters, including emoji
| | * | | feat(terminal): support grapheme clusters, including emojibfredl2025-01-02
| | | | |
| * | | | feat(ui): more intuitive :substitute confirm prompt #31787luukvbaal2025-01-02
| | | | | | | | | | | | | | | | | | | | Problem: Unknown key mappings listed in substitute confirm message. Solution: Include hints as to what the key mappings do.
| * | | | feat(ui)!: emit prompt "messages" as cmdline events #31525luukvbaal2025-01-02
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Problem: Prompts are emitted as messages events, where cmdline events are more appropriate. The user input is also emitted as message events in fast context, so cannot be displayed with vim.ui_attach(). Solution: Prompt for user input through cmdline prompts.
| * | | fix(jobs): do not block UI when jobwait() doesn't block (#31803)Gregory Anders2025-01-01
| | | |
| * | | refactor(options): use `const` in more places (#31791)Famiu Haque2025-01-01
| | | |
| * | | fix(tui): handle key events for arrow and function keys (#31804)Gregory Anders2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arrow and function keys do not use CSI u with the kitty keyboard protocol. For example, the Up arrow key uses CSI A, and the function keys use a variety of different CSI sequences. Until now, termkey only parsed subparams used by key events for CSI u sequences. The result being that any key which did not use CSI u (e.g. arrow and function keys) was being emitted twice by termkey since it was not recognizing the separate press and release events. This commit makes termkey also parse subparams for other key sequences so that the release key events do not send duplicate keys.
| * | | feat(tui): handle kitty key events in libtermkey (#31727)Gregory Anders2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | Enable key event reporting in the kitty keyboard protocol. This causes supporting terminals to send key events for presses, repeats, and key releases. For now we ignore release events, but eventually we will support users mapping those.
| * | | vim-patch:9.1.0983: not able to get the displayed items in complete_i… ↵glepnir2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31796) vim-patch:9.1.0983: not able to get the displayed items in complete_info() Problem: not able to get the displayed items in complete_info() (Evgeni Chasnovski) Solution: return the visible items via the "matches" key for complete_info() (glepnir) fixes: vim/vim#10007 closes: vim/vim#16307 https://github.com/vim/vim/commit/d4088edae21659e14ab5f763c820f4eab9d36981
| * | | fix(termkey): fix null pointer dereference (#31792)Gregory Anders2024-12-30
| | | |
| * | | vim-patch:9.1.0963: fuzzy-matching does not prefer full match (#31741)glepnir2024-12-27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: fuzzy-matching does not prefer full match (Maxim Kim) Solution: add additional score for a full match (glepnir) fixes: vim/vim#15654 closes: vim/vim#16300 https://github.com/vim/vim/commit/5a04999a7402201cf1b47ff10bc474dd1cdc24f4
| * | fix(api): clamp range lines in `nvim__redraw()` (#31710)Artem2024-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `nvim__redraw()` doesn't clamp the lines in the `range` parameter before truncating to int. The resulting range may be empty when the original range contained buffer lines and vice versa. E.g. for a buffer with 4 lines, these are the redrawn lines: ```lua { 2, 2 ^ 31 } -> none (should be { 2, 3 }) { 2, 2 ^ 32 } -> none (should be { 2, 3 }) { 2 ^ 32 - 1, 2 } -> { 0, 1 } (should be none) ``` Solution: Clamp `range` values before truncating to int.