aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* vim-patch: port some userfunc.c refactorings from Vim (#32292)zeertzjq2025-02-02
| | | | | | | | | | | | Port one_function_arg() and get_function_body() from Vim. vim-patch:8.2.2865: skipping over function body fails Problem: Skipping over function body fails. Solution: Do not define the function when skipping. https://github.com/vim/vim/commit/d87c21a918d8d611750f22d68fc638bf7a79b1d5 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(autocmds): once=true Lua event-handler may call itself #29544Felipe Vicentin2025-02-01
| | | | | | | | | | | | | | | | | | Problem: Event handler declared with `once=true` can re-trigger itself (i.e. more than once!) by calling `nvim_exec_autocmds` or `:doautocmd`. Analysis: This happens because the callback is executed before deletion/cleanup (`aucmd_del`). And calling `aucmd_del` before `call_autocmd_callback` breaks the autocmd execution... Solution: Set `ac->pat=NULL` to temporarily "delete" the autocmd, then restore it after executing the callback. Fix #25526 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:9.1.1065: no digraph for "Approaches the limit" (#32289)zeertzjq2025-02-02
| | | | | | | | | | | | | | Problem: no digraph for "Approaches the limit" Solution: Add the digraph using .= (Hans Ginzel) Add digraph Approaches the Limit ≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm closes: vim/vim#16508 https://github.com/vim/vim/commit/3a621188ee52badfe7aa783db12588a78dcd8ed6 Co-authored-by: Hans Ginzel <hans@matfyz.cz>
* vim-patch:9.1.1059: completion: input text deleted with preinsert when ↵zeertzjq2025-02-01
| | | | | | | | | | | | | adding leader (#32276) Problem: completion: input text deleted with preinsert when adding leader Solution: remove compl_length and check the ptr for being equal to pattern when preinsert is active (glepnir) closes: vim/vim#16545 https://github.com/vim/vim/commit/bfb4eea7869b0118221cd145a774d74191ce6130 Co-authored-by: glepnir <glephunter@gmail.com>
* docs: miscdundargoc2025-01-30
| | | | | | | | | Co-authored-by: Dustin S. <dstackmasta27@gmail.com> Co-authored-by: Ferenc Fejes <fejes@inf.elte.hu> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: brianhuster <phambinhanctb2004@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(colorscheme): distinguish CursorLine/Folded/StatusLineNC highlights #32256Evgeni Chasnovski2025-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: currently `CursorLine`, `Folded`, `StatusLineNC` highlight groups have the same background color in default color scheme (Grey3). This is a result of optimizing their highlighting to be different from `Normal` but not draw too much attention. However, this design has a usability issue as those groups are sometimes appear together which can make it hard (but not impossible) to differentiate between them. This was previously partially resolved with `StatusLineNC` using Grey1 as background (and thus be different from `CursorLine` but closer to `Normal`), but optimizing more towards it being a visible separator between windows was decided to be more important. Solution: make `Folded` use Grey1 and `StatusLineNC` use Grey4. This makes all three highlight groups have different backgrounds with the following consequences: - Folds now have the same background as floating windows. It makes them there differentiable only by the value of 'foldtext' (which is usually enough). Optimizing for the case "cursor line is next to the fold" seems to be more useful than for the case "make folds in floating window differ by background". - Statusline of inactive windows now draw more attention to them. The benefits are that they are different from cursor column and are better window separators. - Inactive tabline (both `TabLine` and `TabLineFill`) now also draws a bit more attention to it (as they are linked to `StatusLineNC`) but with the benefit of also being different from `CursorLine`.
* vim-patch:9.1.1057: Superfluous cleanup steps in test_ins_complete.vim (#32257)zeertzjq2025-01-30
| | | | | | | | | | Problem: Superfluous cleanup steps in test_ins_complete.vim. Solution: Remove unnecessary :bw! and :autocmd! commands. Also remove unnecessary STRLEN() in insexpand.c (zeertzjq) closes: vim/vim#16542 https://github.com/vim/vim/commit/8297e2cee337c626c6691e81b25e1f1897c71b86
* vim-patch:9.1.1056: Vim doesn't highlight to be inserted text when ↵zeertzjq2025-01-30
| | | | | | | | | | | | | | | | | completing (#32251) Problem: Vim doesn't highlight to be inserted text when completing Solution: Add support for the "preinsert" 'completeopt' value (glepnir) Support automatically inserting the currently selected candidate word that does not belong to the latter part of the leader. fixes: vim/vim#3433 closes: vim/vim#16403 https://github.com/vim/vim/commit/edd4ac3e895ce16034c7e098f1d68e0155d97886 Co-authored-by: glepnir <glephunter@gmail.com>
* fix(ui): avoid redundant ext_cmdline events (#32237)luukvbaal2025-01-29
| | | | | | | | Problem: `cmdline_show` is emitted unnecessarily each event loop iteration, because `cmdline_was_last_drawn` is never set. Solution: Keep track of whether the cmdline was last drawn to avoid unnecessarily emitting cmdline_show. Set `redraw_state` to emit `cmdline_pos` when emitting `CursorMovedC`. Only emit `cmdline_pos` when cmdline was last drawn.
* fix(mpack): remove invalid bool definitionAndreas Schneider2025-01-27
| | | | | This causes build failures with gcc 15. Fixes #31723
* fix(float): cannot set title/footer independently #31993glepnir2025-01-27
| | | | | | | | Problem: `nvim_win_set_config` cannot set the title and footer independently. When only one is given, the other is reset to the default of "left". Solution: Reuse existing title/footer value if not provided.
* build(deps)!: bump tree-sitter to HEAD, wasmtime to v29.0.1 (#32200)Christian Clason2025-01-27
| | | | | Breaking change: `ts_node_child_containing_descendant()` was removed Breaking change: tree-sitter 0.25 (HEAD) required
* refactor(api): add missing cast #31960glepnir2025-01-26
|
* feat(diagnostic): virtual_lines #31959Maria José Solano2025-01-26
|
* feat(api): nvim_get_autocmds filter by id#31549glepnir2025-01-26
| | | | | | | Problem: nvim_get_autocmds cannot filter by id. Solution: Support it.
* vim-patch:9.1.1053: "nosort" enables fuzzy filtering even if "fuzzy" isn't ↵zeertzjq2025-01-25
| | | | | | | | | | | | | in 'completeopt' Problem: "nosort" enables fuzzy filtering even if "fuzzy" isn't in 'completeopt' (after v9.1.1049) Solution: Only enable fuzzy filtering when "fuzzy" is in 'completeopt'. (zeertzjq) closes: vim/vim#16510 https://github.com/vim/vim/commit/d65aa1bbdb808ef8fecde6df240c48cc39a52a8e
* vim-patch:9.1.1049: insert-completed items are always sortedzeertzjq2025-01-25
| | | | | | | | | | | | | | | | | | | Problem: insert-completed items are always sorted, although the LSP spec[1] standard defines sortText in the returned completionitem list. This means that the server has sorted the results. When fuzzy is enabled, this will break the server's sorting results. Solution: disable sorting of candidates when "nosort" is set in 'completeopt' [1] https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem closes: vim/vim#16501 https://github.com/vim/vim/commit/f400a0cc41113eb75516bdd7f38aeaa15208ba2c Co-authored-by: glepnir <glephunter@gmail.com>
* fix(log): log unset $TMPDIR at "debug" level #32137phanium2025-01-24
|
* feat(extmarks): virtual text can be right-aligned, truncated #31921georgev932025-01-24
| | | | | | | | | Problem: Right aligned virtual text can cover up buffer text if virtual text is too long Solution: An additional option for `virt_text_pos` called `eol_right_align` has been added to truncate virtual text if it would have otherwise covered up buffer text. This ensures the virtual text extends no further left than EOL.
* fix(lua): pop retval for fast context LuaRefLuuk van Baal2025-01-24
| | | | | | Problem: nlua_call_ref_ctx() does not pop the return value in fast context that did not error. Solution: Fall through to end; calling nlua_call_pop_retval().
* fix(messages): avoid empty msg_showmode with 'noshowmode'Luuk van Baal2025-01-24
|
* vim-patch:partial:9.1.1050: too many strlen() calls in os_unix.c (#32188)zeertzjq2025-01-24
| | | | | | | | | | | | | | Problem: too many strlen() calls in os_unix.c Solution: refactor os_unix.c and remove calls to strlen() (John Marriott) closes: vim/vim#16496 https://github.com/vim/vim/commit/efc41a5958bf25b352e0916af5f57dafbbb44f17 Omit os_expand_wildcards() change: Nvim's code is more complicated and harder to refactor. Co-authored-by: John Marriott <basilisk@internode.on.net>
* fix(column): apply custom highlight to last 'statuscolumn' segment (#32182)luukvbaal2025-01-24
|
* fix(mouse): 'statuscolumn' fold and popopmenu handlingLuuk van Baal2025-01-23
| | | | | | | | | Problem: A right-click on the 'statuscolumn' does not open the popupmenu, even if a cell without a clickdef is clicked. Clicking the %C fold item does not open/close the fold. Solution: Open the popupmenu when there is no clickdef like right-clicking the sign/numbercolumn does. Fill "linebuf_vcol" when drawing the 'statuscolumn' to handle foldcolumn item clicks.
* feat(api): combined highlights in nvim_eval_statusline()Luuk van Baal2025-01-23
| | | | | | | | | | | Problem: Combined highlighting was not applied to nvim_eval_statusline(), and 'statuscolumn' sign segment/numhl highlights. Solution: Add an additional `groups` element to the return value of `nvim_eval_statusline()->highlights`. This is an array of stacked highlight groups (highest priority last). Also resolve combined highlights for the 'statuscolumn' sign segment/numhl highlights. Expose/synchronize some drawline.c logic that is now mimicked in three different places.
* vim-patch:9.1.1048: crash after scrolling and pasting in silent Ex mode (#32168)zeertzjq2025-01-23
| | | | | | | | | | Problem: Crash after scrolling and pasting in silent Ex mode. (fizz-is-on-the-way) Solution: Don't move cursor to line 0 when scrolling. (zeertzjq) closes: vim/vim#16506 https://github.com/vim/vim/commit/df098fedbc2c481e91ea7e6207dab90359a92cc3
* fix(editor): avoid scrolling :substitute confirm message #32149luukvbaal2025-01-22
| | | Regression from 48e2a73.
* fix(startup): avoid crash with completion from -l script (#32160)zeertzjq2025-01-22
| | | Related #27764
* vim-patch:9.1.1046: fuzzymatching doesn't prefer matching camelcase (#32155)zeertzjq2025-01-22
| | | | | | | | | | | | Problem: fuzzymatching doesn't prefer matching camelcase (Tomasz N) Solution: Add extra score when case matches (glepnir) fixes: vim/vim#16434 closes: vim/vim#16439 https://github.com/vim/vim/commit/9dfc7e5e6169594f6f4607ef1ba9dd347a9194d2 Co-authored-by: glepnir <glephunter@gmail.com>
* fix(search): avoid quadratic time complexity when computing fuzzy score (#32153)zeertzjq2025-01-22
|
* feat(terminal): forward X1 and X2 mouse eventszeertzjq2025-01-21
| | | | | Ref: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons
* feat(tui): recognize X1 and X2 mouse eventszeertzjq2025-01-21
| | | | | Ref: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons
* Merge pull request #32098 from bfredl/multihl_groupbfredl2025-01-21
|\ | | | | feat(extmark): stack multiple highlight groups in `hl_group`
| * feat(extmark): stack multiple highlight groups in `hl_group`bfredl2025-01-21
| | | | | | | | | | | | | | | | | | This has been possible in the "backend" for a while but API was missing. Followup: we will need a `details2=true` mode for `nvim_get_hl_id_by_name` to return information in a way forward compatible with even further enhancements.
* | Merge pull request #32099 from bfredl/no_bufhlbfredl2025-01-20
|\ \ | | | | | | feat(api): deprecate nvim_buf_add_highlight()
| * | feat(api): deprecate nvim_buf_add_highlight()bfredl2025-01-20
| | | | | | | | | | | | | | | | | | | | | This was kept for a while as it was a useful short hand and initially matched what highlights what actually properly implemented. But now |vim.hl.range()| is a better high-level shorthand with full support for native multi-line ranges.
* | | feat(inccommand): preview 'nomodifiable' buffers #32034Donatas2025-01-20
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Incremental preview is not allowed on 'nomodifiable' buffers. Solution: - Allow preview on 'nomodifiable' buffers. - Restore the 'modifiable' option in case the preview function changes it.
* | | fix(messages): compute msg_col after last newline in ext_messagesLuuk van Baal2025-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: We want to keep track of the current message column, which is done very rudimentary for ext_messages; only checking if the message ends in a newline to reset the column, while computing the entire cellwidth of the message, which may contain (multiple) newlines not necessarily at the end (since 21718c6). This introduced a noticeable delay for large messages (e.g. :=vim). Solution: Calculate the cellwidth of the message after the last newline. Use it to keep track of the current message column. This might not be a functional change currently, since it only affects messages with (multiple) newlines not at the end of a message, which I don't think we emit internally, and msg_col is reset for a new kind. It does fix the performance problem.
* | | Merge pull request #31597 from bfredl/deletionismbfredl2025-01-20
|\ \ \ | | | | | | | | fix(wininfo): when freeing windows, free the lowest priority wininfo
| * | | fix(wininfo): when freeing windows, free the lowest priority wininfobfredl2025-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On master (and also before #31539) closing a window could cause the used wininfo for a buffer to change. This is due to always removing the previous NULL wininfo when deleting a window, even if that wininfo had higher priority than the the deleted window's own wininfo. Instead delete the wininfo with lowest priority. This retains the memory saving efect while not affecting the effective value of window options and so on.
* | | | fix(log): unintuitive message for undefined $TMPDIRdeepsghimire2025-01-19
| |/ / |/| |
* | | fix(coverity/530826): validate_opt_idx unchecked negative idx (#32081)Devon Gardner2025-01-19
| | | | | | | | | | | | | | | | | | | | | Problem: opt_idx possible negative value used as index Solution: check opt_idx not less than zero (kOptInvalid)
* | | fix(lua): prevent SIGSEGV when lua error is NULL in libuv_worker林玮 (Jade Lin)2025-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Calling `xstrdup` with a NULL pointer causes a SIGSEGV if `lua_tostring` returns NULL in `nlua_luv_thread_common_cfpcall`. Crash stack trace: - `_platform_strlen` → `xstrdup` (memory.c:469) - `nlua_luv_thread_common_cfpcall` (executor.c:281) Solution: Check if `lua_tostring` returns NULL and pass NULL to `event_create` to avoid the crash.
* | | vim-patch:9.1.1028: too many strlen() calls in screen.c (#32083)zeertzjq2025-01-18
| |/ |/| | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in screen.c Solution: refactor screen.c and remove calls to strlen(), verify that leadmultispace != NULL (John Marriott) closes: vim/vim#16460 https://github.com/vim/vim/commit/c15de972e8131def2f506bb9eb6b306ca089629c Co-authored-by: John Marriott <basilisk@internode.on.net>
* | refactor(cmdline): more idiomatic way to avoid cmdline_showLuuk van Baal2025-01-17
| | | | | | | | | | Problem: Fix applied in #32033 can be more idiomatic. Solution: Unset redraw_state instead of cmdbuff.
* | vim-patch:9.1.1021: string might be used without a trailing NUL (#32062)zeertzjq2025-01-17
| | | | | | | | | | | | | | | | | | | | Problem: string might be used without a trailing NUL (after v9.1.0997) Solution: Make sure that the buffer is NUL terminated closes: vim/vim#16457 https://github.com/vim/vim/commit/70dfc374ec72634a0a61aea8344178779675d516 Co-authored-by: John Marriott <basilisk@internode.on.net>
* | vim-patch:9.1.1020: no way to get current selected item in a async context ↵zeertzjq2025-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | (#32056) Problem: no way to get current selected item in a async context Solution: add completed flag to show the entries of currently selected index item (glepnir) closes: vim/vim#16451 https://github.com/vim/vim/commit/037b028a2219d09bc97be04b300b2c0490c4268d Co-authored-by: glepnir <glephunter@gmail.com>
* | Merge pull request #32038 from gpanders/push-nsrttwwnsqvmGregory Anders2025-01-16
|\ \ | | | | | | feat(terminal): add support for kitty keyboard protocol
| * | feat(terminal): add support for kitty keyboard protocolGregory Anders2025-01-16
| | | | | | | | | | | | | | | | | | This commit adds basic support for the kitty keyboard protocol to Neovim's builtin terminal. For now only the first mode ("Disambiguate escape codes") is supported.
* | | 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