aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* docs: news, lsp autocomplete #33047Justin M. Keyes2025-03-26
|
* vim-patch:9.1.1238: wrong cursor column with 'set splitkeep=screen' (#33060)zeertzjq2025-03-26
| | | | | | | | | | | | | | | | | | | | Problem: With ':set splitkeep=screen', cursor did't restore column correctly when splitting a window on a line longer than the last line on the screen (after v9.1.0707) Solution: Restore cursor column in `win_fix_scroll()` since it may be changed in `getvcol()` after 396fd1ec2956 (phanium). Example: ``` echo longlonglongling\nshort | vim - -u NONE --cmd 'set splitkeep=screen' +'norm $' +new +q ``` fixes: vim/vim#16968 closes: vim/vim#16971 https://github.com/vim/vim/commit/7746348c5d0f4c4707503f856d0335d8921e8d50 Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
* fix(mswin): UI may hang on exitJustin M. Keyes2025-03-25
| | | | | | | | | Problem: On Windows, since b360c0608556, UI may hang on exit. #33019 Solution: Restore the hack in on_proc_exit, until we can figure out why rpc_close is not called in the UI client when the server closes the channel.
* fix(channel): log after (not before) channel-closeJustin M. Keyes2025-03-24
| | | | | | | | | | Problem: chan_close_on_err() writes to the log file before peforming its actual work. This could be slightly misleading in terms of log timestamps, or could delay important work on Windows where file-open/write can be slow. Solution: Log after closing the channel, instead of before.
* refactor(channel): redundant channel_close()Justin M. Keyes2025-03-24
| | | | | | | | | | Problem: `receive_msgpack()` calls `channel_close()` just before calling `chan_close_on_err()`, even though `chan_close_on_err()` always calls `channel_close()`. Solution: Remove the redunant `channel_close()` in `receive_msgpack()`.
* fix(log): unify error messages for vim.ui_attach/decor providers #33005luukvbaal2025-03-21
| | | | | | | Problem: Error messages that cause a vim.ui_attach() namespace to detach are not visible in the message history. Decoration provider and vim.ui_attach error messages are dissimilar. Solution: Emit vim.ui_attach() errors as an actual message in addition to logging it. Adjust error message format.
* vim-patch:9.1.1226: "shellcmdline" completion doesn't work with input() (#32998)zeertzjq2025-03-20
| | | | | | | | | | | | | | Problem: "shellcmdline" completion doesn't work with input(). Solution: Use set_context_for_wildcard_arg(). Fix indent in nextwild() (zeertzjq). There are some other inconsistencies for input() completion (ref vim/vim#948), but since "shellcmdline" currently doesn't work at all, it makse sense to at least make it work. fixes: vim/vim#16932 closes: vim/vim#16934 https://github.com/vim/vim/commit/7a5115ce50c622caf91503f9d7fe09c3749b928b
* fix(messages): incorrect error message splitting and kind #32990luukvbaal2025-03-19
| | | | | | | | | Problem: Message kind logic for emitting an error message is convoluted and still results in emitting an unfinished message earlier than wanted. Solution: Ensure emsg_multiline() always sets the kind wanted by the caller and doesn't isn't unset to logic for emitting the source message. Caller is responsible for making sure multiple message chunks are not emitted as multiple events by setting `msg_ext_skip_flush`...
* fix(path): crash with nvim_get_runtime_file during wildcard expansion (#32992)zeertzjq2025-03-19
| | | | | Problem: Crash with nvim_get_runtime_file during wildcard expansion. Solution: Ensure recursive gen_expand_wildcards() is allowed when calling os_breakcheck()
* fix(api): don't use 'winborder' when reconfiguring float (#32984)glepnir2025-03-19
| | | | | | Problem: Reconfiguring a float window applies the global 'winborder'. Solution: - Ignore 'winborder' when reconfiguring a float window. - Still apply 'winborder' when converting a split to a float window.
* fix(marks): ensure decor is removed with proper range (#32973)luukvbaal2025-03-19
| | | | | | | Problem: Paired mark whose end is in front of its start should not have its decor removed (as fixed by 72f630f9), but may still need to have its range redrawn. Solution: Still call `buf_decor_remove()` but ensure it is not called with an inverse range when `extmark_del()` is called on an end mark.
* fix(api): fix 'winborder' preventing splits with nvim_open_win (#32981)zeertzjq2025-03-19
| | | | | | While at it, rename the p_winbd variable to p_winborder, as 'winbd' is not the option's short name. Co-authored-by: glepnir <glephunter@gmail.com>
* fix(options): fix 'winborder' accepting multiple string values (#32978)zeertzjq2025-03-19
| | | | | | Problem: 'winborder' accepting multiple string values. Solution: Use the fallback did_set_str_generic() callback instead of did_set_winborder() which calls opt_strings_flags() with incorrect last argument.
* vim-patch:9.1.1221: Wrong cursor pos when leaving Insert mode just after ↵zeertzjq2025-03-18
| | | | | | | | | | | | | | 'autoindent' (#32976) Problem: Wrong cursor position and '^' mark when leaving Insert mode just after 'autoindent' and cursor on last char of line. Solution: Don't move cursor to NUL when it wasn't moved to the left (zeertzjq). fixes: vim/vim#15581 related: neovim/neovim#30165 neovim/neovim#32943 closes: vim/vim#16922 https://github.com/vim/vim/commit/a3a7d10bfb9547991e04bcf12d1391deb8060754
* vim-patch:9.1.1222: using wrong length for last inserted string (#32975)zeertzjq2025-03-19
| | | | | | | | | | | | | | | | Problem: using wrong length for last inserted string (Christ van Willegen, after v9.1.1212) Solution: use the correct length in get_last_insert_save(), make get_last_insert() return a string_T (John Marriott) closes: vim/vim#16921 https://github.com/vim/vim/commit/8ac0f73eb1e0e6128dd21eb294d12b83b615f05a N/A patches: vim-patch:9.1.1129: missing out-of-memory test in buf_write() vim-patch:9.1.1218: missing out-of-memory check in filepath.c Co-authored-by: John Marriott <basilisk@internode.on.net>
* feat(float): add winborder option (#31074)glepnir2025-03-18
| | | | | | | | | Problem: There is currently no global option to define the default border style for floating windows. This leads to repetitive code when developers need consistent styling across multiple floating windows. Solution: Introduce a global option winborder to specify the default border style for floating windows. When a floating window is created without explicitly specifying a border style, the value of the winborder option will be used. This simplifies configuration and ensures consistency in floating window appearance. Co-authored-by: Gregory Anders <greg@gpanders.com>
* docs: misc #32959Justin M. Keyes2025-03-18
|
* vim-patch:9.1.1216: Pasting the '.' register multiple times may not workzeertzjq2025-03-18
| | | | | | | | | | | Problem: Pasting the '.' register multiple times may work incorrectly when the last insert starts with Ctrl-D and ends with '0'. (after 9.1.1212) Solution: Restore the missing assignment (zeertzjq). closes: vim/vim#16908 https://github.com/vim/vim/commit/61b354442418539056cc7073a9aec353d297836c
* vim-patch:3495497: patch 9.1.1212: too many strlen() calls in edit.czeertzjq2025-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in edit.c Solution: refactor edit.c and remove strlen() calls (John Marriott) This commit attempts to make edit.c more efficient by: - in truncate_spaces() pass in the length of the string. - return a string_T from get_last_insert(), so that the length of the string is available to the caller. - refactor stuff_insert(): - replace calls to stuffReadbuff() (which calls STRLEN() on it's string argument) with stuffReadbuffLen() (which gets the length of it's string argument passed in). - replace call to vim_strrchr() which searches from the start of the string with a loop which searches from end of the string to find the last ESC character. - change get_last_insert_save() to call get_last_insert() to get the last_insert string (the logic is in one place). closes: vim/vim#16863 https://github.com/vim/vim/commit/34954972c27244a4a1fb4eeeae2aa4e021efd100 Co-authored-by: John Marriott <basilisk@internode.on.net>
* fix(column): unnecessary redraws with resized 'statuscolumn' (#32944)luukvbaal2025-03-17
| | | | | | | | | | | Problem: Since 3cb1e825, all windows with 'statuscolumn' set, and a resized 'signcolumn' for a particular buffer are marked to be fully redrawn when the first window is encountered. The "resized" variable is only unset after all windows have been drawn, so this results in windows that have just been draw to be marked for redraw again, even though the signcolumn did not change size again. Solution: Replace the `resized` variable with a `last_max` variable that is changed when the first window into buf is encountered.
* docs: miscJustin M. Keyes2025-03-17
|
* docs(api): rename "handle" => "id"Justin M. Keyes2025-03-17
|
* fix(marks): issues with invalid marks and marks beyond eob (#32862)luukvbaal2025-03-16
| | | | | | | Problem: Marks that go beyond the end of the buffer, and paired marks whose end is in front of its start mark are added to and removed from the decor. This results in incorrect tracking of the signcolumn. Solution: Ensure such marks are not added to and removed from the decor.
* refactor(tui): disable kitty key event reportingGregory Anders2025-03-16
| | | | | Temporary measure for the stable release. Re-enable for nightly after 0.11 release.
* fix(statuscolumn): misleading v:lnum for virtual lines #32912luukvbaal2025-03-15
| | | | | | | Problem: Virtual 'statuscolumn' lines are evaluated with a misleading v:(rel)num. Namely set to the line above for `virt_lines_above = true` lines, or even the last drawn line for a partial redraw. Solution: Set `v:lnum` for the first evaluated row of a line, first above virtual line of a row and first non-virtual line of a row.
* docs: miscdundargoc2025-03-15
| | | | | | | | | | | | | Co-authored-by: Au. <acehinnnqru@gmail.com> Co-authored-by: Daniel Rainer <daniel.rainer@localhost> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Luuk van Baal <luukvbaal@gmail.com> Co-authored-by: Pierre Barbin <pierre@heitzsystem.com> Co-authored-by: Riley Bruins <ribru17@hotmail.com> Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Co-authored-by: phanium <91544758+phanen@users.noreply.github.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* feat(defaults): completeopt=popup #32909Justin M. Keyes2025-03-15
| | | | Assuming that completeopt=popup does what its documentation claims, it is more appropriate that completeopt=preview as a default.
* fix(cmdline): ext_cmdline block events for conditionalsLuuk van Baal2025-03-15
| | | | | | Problem: No block events emitted with ext_cmdline for :if, :while, :try etc. Solution: Emit cmdline block events; store the indent level of the previous cmdline and whether a block event was emitted.
* vim-patch:9.1.1205: completion: preinserted text not removed when closing ↵glepnir2025-03-15
| | | | | | | | | | pum (#32903) Problem: completion: preinserted text not removed when closing pum Solution: delete preinsert text inside in ins_compl_stop() (glepnir). closes: vim/vim#16891 https://github.com/vim/vim/commit/84a7503e29dc248661efc98b6c59d2e911452d5c
* vim-patch:9.1.1204: MS-Windows: crash when passing long string to expand() ↵zeertzjq2025-03-15
| | | | | | | | | | | | (#32902) Problem: MS-Windows: crash when passing long string to expand() with 'wildignorecase'. Solution: Use the same buflen as unix_expandpath() in dos_expandpath(). Remove an unnecessary STRLEN() while at it (zeertzjq). closes: vim/vim#16896 https://github.com/vim/vim/commit/00a749bd90e6b84e7e5132691d73fe9aa3fdff05
* vim-patch:9.0.1458: buffer overflow when expanding long file namezeertzjq2025-03-15
| | | | | | | | | | Problem: Buffer overflow when expanding long file name. Solution: Use a larger buffer and avoid overflowing it. (Yee Cheng Chin, closes vim/vim#12201) https://github.com/vim/vim/commit/a77670726e3706973adffc2b118f4576e1f58ea0 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:8.2.4963: expanding path with "/**" may overrun end of bufferzeertzjq2025-03-15
| | | | | | | | | Problem: Expanding path with "/**" may overrun end of buffer. Solution: Use vim_snprintf(). https://github.com/vim/vim/commit/386c24cd262edac66a31add2fd989c96c4c2c952 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(gen_keycodes): put TAB and K_TAB together (#32882)zeertzjq2025-03-14
| | | | Keep track of the original indexes of both TAB and K_TAB, so that there doesn't have to be an extra table and loop for K_TAB.
* fix(messages): no trailing newline for inputlist, tselect, z= with ext_messagesLuuk van Baal2025-03-13
| | | | | | | | | | Problem: Various list commands end in a newline to go to a new line on the message grid for the prompt message, which is unwanted with ext_messages. Solution: Don't emit a trailing newline with ext_messages for inputlist(), :tselect and z=. Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
* vim-patch:9.1.1195: inside try-block: fn body executed with default arg ↵zeertzjq2025-03-13
| | | | | | | | | | | | | | | undefined (#32866) Problem: inside try-block: fn body executed when default arg is undefined Solution: When inside a try-block do not execute function body after an error in evaluating a default argument expression (Shane Harper). closes: vim/vim#16865 https://github.com/vim/vim/commit/2d18789aa67cc60072ea0cf21811c403fa0b2c7b Co-authored-by: Shane Harper <shane@shaneharper.net>
* vim-patch:c1c3b5d: runtime(doc): remove unnecessary "an" (#32865)zeertzjq2025-03-13
| | | | | | | | | | | | "umask" is pronounce like "youmask", so having an "an" before it is a bit strange. In other places in the help, "umask" is not preceded by either "a" or "an", and sometimes preceded by "the". Also, "Note" is usually followed either by ":" or "that" in builtin.txt, so add a ":" after "Note". closes: 16860 https://github.com/vim/vim/commit/c1c3b5d6a0a3032057bf6de8672cc79100bb73c9
* fix(terminal): delay when finishing terminal process #32846markstegeman2025-03-12
| | | | | | | | | | Problem: On Windows, the first attempt at finishing up after a terminal process terminates is delayed by 200ms, even if it would be possible to finish up immediately. Solution: Make the first attempt at finishing up immediately after the process terminates.
* refactor(popup): use plines_m_win #32857glepnir2025-03-12
| | | | | Problem: Custom inline function duplicated existing functionality Solution: Used existing plines_m_win function to reduce code duplication
* vim-patch:0a336cc: runtime(doc): clarify that a umask is applied to mkdir() ↵zeertzjq2025-03-11
| | | | | | | | | (#32845) fixes: vim/vim#16849 https://github.com/vim/vim/commit/0a336ccb57003c44ba303ccc50cf50cb640c2309 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(ui): schedule UI detach (#32827)Gregory Anders2025-03-11
| | | | | | | | | | When a UI detaches it will execute any UILeave events. Autocommands cannot run in a libuv handler because they will in turn poll the event loop, which results in recursive loop execution. So we schedule the callback to detach the UI on the main event queue. We also have to schedule the exit when the RPC channel is closed to ensure it does not run until after `remote_ui_disconnect` has run, otherwise it will hang.
* feat(treesitter): allow disabling captures and patterns on TSQuery (#32790)Ian Chamberlain2025-03-11
| | | | | | | | | Problem: Cannot disable individual captures and patterns in treesitter queries. Solution: * Expose the corresponding tree-sitter API functions for `TSQuery` object. * Add documentation for `TSQuery`. * Return the pattern ID from `get_captures_at_pos()` (and hence `:Inspect!`).
* vim-patch:9.1.1193: Unnecessary use of STRCAT() in au_event_disable() (#32829)zeertzjq2025-03-11
| | | | | | | | | | | | | Problem: Unnecessary use of STRCAT() in au_event_disable(). STRCAT() seeks to the end of new_ei, but here the end is already known. Solution: Use STRCPY() and add p_ei_len to new_ei. Also fix a typo in a comment. Add a test that 'eventignore' works in :argdo (zeertzjq). closes: vim/vim#16844 https://github.com/vim/vim/commit/969e11a18b145241dc0ab39fc1be7ed814655dfc Cherry-pick p_ei_len from patch 9.1.0256.
* fix(events): fix incorrect capitalization of Cmdwin* events (#32813)zeertzjq2025-03-11
| | | | | | The name of Cmdwin* events were changed to CmdWin* in 8ed2dbf6e2802516501c11e72e5d6d977e6a07f3 without explanation. This commit changes them back. This doesn't affect the creation or execution of autocommands. It only affects the listing of autocommands.
* docs(vvars): vim.v.event.windows #32673Vlad2025-03-10
|
* fix(popup): new preview_bufnr created when menu item is selected #32819glepnir2025-03-10
| | | | | | | | Problem: "use_float" in the if-condition causes a new buffer to be generated on every execution. Solution: - Remove the incorrect use_float check from the condition. - Use buf_clear to properly clear the existing buffer.
* fix(lua): types for vim.api.keyset.win_config #32700Tomasz N2025-03-10
|
* refactor(gen_events): sort enums case-insensitively (#32811)zeertzjq2025-03-10
| | | | | | | | This actually only affects the order in which Cmdline* and Cmdwin* autocommands are listed, and it appears that the names of Cmdwin* were changed to CmdWin* in 8ed2dbf6e2802516501c11e72e5d6d977e6a07f3 without explanation. Also, remove the final NULL element from the names table.
* vim-patch:9.1.1190: C indentation does not detect multibyte labels (#32808)zeertzjq2025-03-09
| | | | | | | | | | | Problem: C indentation does not detect multibyte labels Solution: Correctly skip over multibyte characters (Anttoni Erkkilä) closes: vim/vim#16770 https://github.com/vim/vim/commit/f4d87ff8883e5076633ef0ab0cf4d6e4beaddc5c Co-authored-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
* perf(events): use hashy for event name lookup (#32802)zeertzjq2025-03-10
|
* docs(api): show "since" in API docs #32806Justin M. Keyes2025-03-09
|