aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | | refactor(options): generic expand and did_set callbacks (#32011)Lewis Russell2025-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(options): generic expand and did_set callbacks Problem: Many options have similar callbacks to check the values are valid. Solution: Generalize these callbacks into a single function that reads the option table. * refactor: gen_options.lua refactor: gen_options.lua - inline get_cond * refactor(options): use a simpler format for the common default
* | | vim-patch:9.1.1017: Vim9: Patch 9.1.1013 causes a few problemszeertzjq2025-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: Patch 9.1.1013 causes a few problems Solution: Translate the function name only when it is a string (Yegappan Lakshmanan) fixes: vim/vim#16453 closes: vim/vim#16450 https://github.com/vim/vim/commit/9904cbca4132f7376246a1a31305eb53e9530023 Cherry-pick call() change from patch 9.0.0345. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | | vim-patch:9.1.1013: Vim9: Regression caused by patch v9.1.0646zeertzjq2025-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: Regression caused by patch v9.1.0646 Solution: Translate the function name before invoking it in call() (Yegappan Lakshmanan) fixes: vim/vim#16430 closes: vim/vim#16445 https://github.com/vim/vim/commit/6289f9159102e0855bedc566636b5e7ca6ced72c N/A patch: vim-patch:8.2.4176: Vim9: cannot use imported function with call() Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | | vim-patch:9.1.1018: v9.1.0743 causes regression with diff mode (#32047)zeertzjq2025-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: v9.1.0743 causes regression with diff mode Solution: Fix the regression with overlapping regions closes: vim/vim#16454 https://github.com/vim/vim/commit/01f6509fb2de1627cc4ec2c109cd0aa2e3346d50 Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
* | | build: fix lint error on macosdundargoc2025-01-15
|/ /
* | fix(cmdline): prevent cmdline_show events after exiting cmdline #32033luukvbaal2025-01-15
| | | | | | | | | | | | Problem: If a (vim.ui_attach) cmdline_hide callback triggers a redraw, it may cause cmdline_show events for an already exited cmdline. Solution: Avoid emitting cmdline_show event when ccline.cmdbuff is already NULL. Unset ccline.cmdbuff before emitting cmdline_hide.
* | fix(marks): revise metadata for start mark of revalidated pair #32017luukvbaal2025-01-15
| | | | | | | | Problem: Metadata may be revised for end mark of a revalidated pair. Solution: Revise metadata for start mark of a revalidated pair.
* | Merge #32013 from luukvbaal/shellkindJustin M. Keyes2025-01-15
|\ \
| * | fix(messages): verbose kind for nvim_echo()Luuk van Baal2025-01-15
| | | | | | | | | | | | | | | Problem: No "verbose" kind for nvim_echo() opts->verbose. Solution: Pass NULL "kind" to indicate no new kind.
| * | feat(messages): add :!cmd shell message kindsLuuk van Baal2025-01-15
| | | | | | | | | | | | Also print stderr error messages with ErrorMsg highlight group.
* | | vim-patch:9.1.1015: Coverity complains about dereferencing NULL value (#32020)zeertzjq2025-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Coverity complains about dereferencing NULL value Solution: Check that cms2 is not null closes: vim/vim#16438 https://github.com/vim/vim/commit/1ac53b84ada3a992f320566737e66fa00d48611f Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | feat(terminal): support theme update notifications (DEC mode 2031) (#31999)Gregory Anders2025-01-14
| | |
* | | Merge pull request #31932 from bfredl/termtabbfredl2025-01-14
|\ \ \ | | | | | | | | fix(getchar): do not simplify keycodes in terminal mode
| * | | fix(getchar): do not simplify keycodes in terminal modebfredl2025-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code represents a useful pattern in normal mode where remapping `<tab>` will implicitly also remap `<c-i>` unless you remap that explicitly. This relies on the _unmapped_ behavior being identical which is not true in terminal mode, as vterm can distinguish these keys. Vim seems to entangle this with kitty keyboard mode detection which is irrelevant for us. Conditional fallbacks depending on keyboard mode could be done completely inside `vterm/` without getchar.c getting involved, I would think.
* | | | feat(api): nvim_open_win() relative to tabline and laststatus #32006luukvbaal2025-01-14
| |/ / |/| | | | | | | | | | | | | | | | | Problem: Anchoring a floating window to the tabline and laststatus is cumbersome; requiring autocommands and looping over all windows/tabpages. Solution: Add new "tabline" and "laststatus" options to the `relative` field of nvim_open_win() to place a window relative to.
* | | refactor(options): remove code for multitype optionsFamiu Haque2025-01-14
| | | | | | | | | | | | | | | | | | Problem: It was decided on Matrix chat that multitype options won't be necessary for Neovim options, and that options should only have a single canonical type. Therefore the code for supporting multitype options is unnecessary. Solution: Remove the additional code that's used to provide multitype option support.
* | | fix(treesitter): uv_dlclose after uv_dlerrorHorror Proton2025-01-14
| | |
* | | fix(options): better handling of empty valuesLewis Russell2025-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Whether an option is allowed to be empty isn't well defined and isn't properly checked. Solution: - For non-list string options, explicitly check the option value if it is empty. - Annotate non-list string options that can accept an empty value. - Adjust command completion to ignore the empty value. - Render values in Lua meta files
* | | feat(messages): "verbose" message kind #31991luukvbaal2025-01-13
| | |
* | | refactor: delete duplicate utf8-functionalitydundargoc2025-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove British National Replacement Character Set. We keep the DEC Special Graphics and ASCII despite it not being unicode as some old software such as calcurse still rely on this functionality. References: - https://github.com/neovim/neovim/pull/31934#discussion_r1911046426 - https://en.wikipedia.org/wiki/DEC_Special_Graphics - https://vt100.net/docs/vt220-rm/chapter2.html#S2.4.3
* | | vim-patch:9.1.1011: popupmenu internal error with some abbr in completion ↵zeertzjq2025-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | item (#31988) Problem: Popup menu internal error with some abbr in completion item. Solution: Don't compute attributes when there is no corresponding text. Reduce indent in pum_redraw() while at it (zeertzjq). fixes: vim/vim#16427 closes: vim/vim#16435 https://github.com/vim/vim/commit/3a0cc36c69744a7727ce34311d39d2d9d8ddc6f9
* | | feat(treesitter): async parsingRiley Bruins2025-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Problem:** Parsing can be slow for large files, and it is a blocking operation which can be disruptive and annoying. **Solution:** Provide a function for asynchronous parsing, which accepts a callback to be run after parsing completes. Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Luuk van Baal <luukvbaal@gmail.com> Co-authored-by: VanaIgr <vanaigranov@gmail.com>
* | | build(deps): bump wasmtime to v25.0.3Christian Clason2025-01-12
| | |
* | | vim-patch:9.1.1003: [security]: heap-buffer-overflow with visual mode (#31971)zeertzjq2025-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: heap-buffer-overflow with visual mode when using :all, causing Vim trying to access beyond end-of-line (gandalf) Solution: Reset visual mode on :all, validate position in gchar_pos() and charwise_block_prep() This fixes CVE-2025-22134 Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-5rgf-26wj-48v8 https://github.com/vim/vim/commit/c9a1e257f1630a0866447e53a564f7ff96a80ead Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | vim-patch:9.1.1005: completion text is highlighted even with no pattern ↵zeertzjq2025-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | found (#31973) Problem: completion text is highlighted even with no pattern found Solution: use ins_compl_leader_len() instead of checking compl_leader.length (glepnir) closes: vim/vim#16422 https://github.com/vim/vim/commit/9fddb8ae770be3e16545dd4c2f4cfaad8f62cb40 Co-authored-by: glepnir <glephunter@gmail.com>
* | | 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.