aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* vim-patch:9.1.1112: Inconsistencies in get_next_or_prev_match() (#32447)zeertzjq2025-02-14
| | | | | | | | | Problem: Inconsistencies in get_next_or_prev_match() (after 9.1.1109). Solution: Change "file" to "entry" or "match" in comments. Use the same order of branches for PAGEUP and PAGEDOWN (zeertzjq). closes: vim/vim#16633 https://github.com/vim/vim/commit/b6c900be9ce49f688d3a03c2767dedb48e4f23ae
* fix(float): "Not enough room" error for 1-line float #25192glepnir2025-02-14
| | | | | | | | | Problem: set winbar on a floating window which only have one row will cause crash. Solution: when new floating window only have one room don't copy winbar from target window" Fix #19464
* build(windows)!: drop cat and tee executables from windowsdundargoc2025-02-14
| | | | | | | | The legitimacy of the binaries can't be guaranteed and poses a security risk. A replacement version of these may be introduced in the future in a more secure manner. Closes https://github.com/neovim/neovim/issues/32431.
* vim-patch:9.1.1107: cannot loop through completion menu with fuzzy (#32438)zeertzjq2025-02-14
| | | | | | | | | | | | | | | Problem: cannot loop through completion menu with fuzzy and nosort in 'completeopt' (Tomasz N) Solution: Reset cur to zero and update compl_shown_match when 'completeopt' contains "nosort" but not "noselect" (glepnir) fixes: vim/vim#16624 closes: vim/vim#16629 https://github.com/vim/vim/commit/c0b7ca406ba18640c56e2746d6f6d03549d53072 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1109: cmdexpand.c hard to read (#32437)zeertzjq2025-02-14
| | | | | | | | | | Problem: cmdexpand.c hard to read Solution: refactor the file slightly (glepnir) closes: vim/vim#16621 https://github.com/vim/vim/commit/977561a7198b5d31a17b852e332704025c2dbdc8 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1108: 'smoothscroll' gets stuck with 'listchars' "eol" (#32434)zeertzjq2025-02-13
| | | | | | | | | | Problem: 'smoothscroll' gets stuck with 'listchars' "eol". Solution: Count size of 'listchars' "eol" in line size when scrolling. (zeertzjq) related: neovim/neovim#32405 closes: vim/vim#16627 https://github.com/vim/vim/commit/2c47ab8fcd7188fa87053c757ea86b0d846c06c1
* feat(term): trigger TermRequest for APC (#32407)Till Bungert2025-02-13
| | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(memline): don't check line count for closed memline #32403luukvbaal2025-02-12
| | | | | | Problem: Error thrown when for invalid line number which may be accessed in an `on_detach` callback at which point line count is intentionally set to 0. Solution: Move empty memline check to before line number check.
* feat(column): apply appropriate numhl highlight to virt_lines (#32400)luukvbaal2025-02-12
| | | | | | | Problem: Number and statuscolumn highlighting for virtual lines does not take always take on numhl highlights. Solution: Apply the appropriate numhl highlight to the number/statuscolumn of virtual lines, fetching the numhl highlight of the line above for `virt_line_above == false` lines.
* feat(options): add 'eventignorewin' (#32152)luukvbaal2025-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:partial:9.1.1084: Unable to persistently ignore events in a window and its buffers Problem: Unable to persistently ignore events in a window and its buffers. Solution: Add 'eventignorewin' option to ignore events in a window and buffer (Luuk van Baal) Add the window-local 'eventignorewin' option that is analogous to 'eventignore', but applies to a certain window and its buffers. Identify events that should be allowed in 'eventignorewin', adapt "auto_event" and "event_tab" to encode this information. Window context is not passed onto apply_autocmds_group(), and when to ignore an event is a bit ambiguous when "buf" is not "curbuf", rather than a large refactor, only ignore an event when all windows into "buf" are ignoring the event. https://github.com/vim/vim/commit/b7147f8236c962cd74d1ce028d9106f1c449ea6c vim-patch:9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename Problem: tests: Test_WinScrolled_Resized_eiw() uses wrong filename (Luuk van Baal, after v9.1.1084) Solution: Rename the filename to something more unique https://github.com/vim/vim/commit/bfc7719e48ffc365ee0a1bd1888120d26b6365f0
* refactor(insexpand.c): remove duplicate assignment (#32410)zeertzjq2025-02-12
|
* vim-patch:9.1.1101: insexpand.c hard to readzeertzjq2025-02-11
| | | | | | | | | | | | | | | | | | | | | | Problem: insexpand.c hard to read Solution: refactor slightly to make it better readable (glepnir) Problem: - Complex while loops with nested conditions - Redundant if branches - Hard to understand and maintain Solution: - Restructure using while(true) with clear break conditions - Using ternary to replace some if conditions - Add descriptive comments for each step closes: vim/vim#16600 https://github.com/vim/vim/commit/40891bac5d4760e97ff59cd6264f6f00437536e8 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1098: leaking memory with completing multi lineszeertzjq2025-02-11
| | | | | | | | | | | | Problem: leaking memory with completing multi lines (after v9.1.1086) Solution: free allocated memory (glepnir) closes: vim/vim#16605 https://github.com/vim/vim/commit/e3647c8bf5b8143a24a37172e608a2e0c4661318 Co-authored-by: glepnir <glephunter@gmail.com>
* fix(ui): Windows :detach is opt-inJustin M. Keyes2025-02-10
| | | | | | | | | Problem: On Windows, spawning the `nvim --embed` server with `detach=true` breaks various `tt.setup_child_nvim` tests. Solution: Make this behavior opt-in with an env var, temporarily.
* feat(ui): UI :detach commandJustin M. Keyes2025-02-10
| | | | | | | | | | | Problem: Cannot detach the current UI. Solution: - Introduce `:detach`. - Introduce `Channel.detach`. Co-authored-by: bfredl <bjorn.linse@gmail.com>
* fix(api): memory leaks in vim.api.nvim_*get_option #32390Cai Rijun (Richard)2025-02-10
| | | | | | Problem: `get_option_value` returns caller owned `Object`s but the corresponding C apis do not marked `FUNC_API_RET_ALLOC` properly. Solution: add `FUNC_API_RET_ALLOC` to the C apis.
* vim-patch:9.1.1086: completion doesn't work with multi lines (#32377)glepnir2025-02-09
| | | | | | | | | | | Problem: completion doesn't work with multi lines (Łukasz Jan Niemier) Solution: handle linebreaks in completion code as expected (glepnir) fixes: vim/vim#2505 closes: vim/vim#15373 https://github.com/vim/vim/commit/76bdb82527a13b5b2baa8f7d7ce14b4d5dc05b82
* vim-patch:9.1.1083: setreg() doesn't correctly handle mbyte chars in ↵zeertzjq2025-02-09
| | | | | | | | | | | | | | | | | | | | | | blockwise mode Problem: setreg() doesn't correctly handle mbyte chars in blockwise mode Solution: use mb_ptr2len_len function pointer (Yee Cheng Chin) setreg() will automatically calculate the width when a blockwise mode is specified, but it does not properly calculate the line widths of mbyte characters when value is passed as newline-terminated string. It does work when value is passed as a list of lines though. Fix this by properly using the mbyte function pointer to increment the loop counter. closes: vim/vim#16596 https://github.com/vim/vim/commit/a17f8bfb282805ee8ded014089d3094ef6dbf913 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:8.2.2935: calculating register width is not always neededzeertzjq2025-02-09
| | | | | | | | | | Problem: Calculating register width is not always needed. (Christian Brabandt) Solution: Only calculate the width when the type is MBLOCK. https://github.com/vim/vim/commit/6c4c404c580fadd69e39297a6cb4b214f2fcb6d6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2934: ASAN error when using text from the clipboardzeertzjq2025-02-09
| | | | | | | | | Problem: ASAN error when using text from the clipboard. Solution: Get width of each character. https://github.com/vim/vim/commit/24951a67c24e75ec4ff7506f8e2e789ccd786e89 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2933: when 'clipboard' is "unnamed" zp does not work correctlyzeertzjq2025-02-09
| | | | | | | | | | | Problem: When 'clipboard' is "unnamed" zp and zP do not work correctly. Solution: Pass -1 to str_to_reg() and fix computing the character width instead of using the byte length. (Christian Brabandt, closes vim/vim#8301, closes vim/vim#8317) https://github.com/vim/vim/commit/6e0b553fa12fc5ad5d8ee3d8457e7cb16f38b56f Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(messages): improve deadly signal messages #32364Justin M. Keyes2025-02-07
| | | | | | | | Problem: Deadly signal messages mention "Vim", and add redundant newlines. Solution: - Update the messages. - Don't add an extra newline.
* vim-patch:9.1.1081: has('bsd') is true for GNU/Hurdzeertzjq2025-02-07
| | | | | | | | | | | | | | | | Problem: has('bsd') is true for GNU/Hurd Solution: exclude GNU/Hurd from BSD feature flag (Zhaoming Luo) GNU/Hurd, like Mac OS X, is a BSD-based system. It should exclude has('bsd') feature just like what Mac OS X does. The __GNU__ pre-defined macro indicates it's compiled for GNU/Hurd. closes: vim/vim#16580 https://github.com/vim/vim/commit/a41dfcd55b1744b44a47d2fc3feb5d5f6207a556 Co-authored-by: Zhaoming Luo <zhmingluo@163.com>
* feat(defaults): enable diffopt "linematch" #32346Siddhant Agarwal2025-02-06
|
* vim-patch:9.1.1077: included syntax items do not understand contains=TOP ↵zeertzjq2025-02-06
| | | | | | | | | | | | | | | | | | | | (#32343) Problem: Syntax engine interpreted contains=TOP as matching nothing inside included files, since :syn-include forces HL_CONTAINED on for every included item. After 8.2.2761, interprets contains=TOP as contains=@INCLUDED, which is also not correct since it doesn't respect exclusions, and doesn't work if there is no @INCLUDED cluster. Solution: revert patch 8.2.2761, instead track groups that have had HL_CONTAINED forced, and interpret contains=TOP and contains=CONTAINED using this. (Theodore Dubois) fixes: vim/vim#11277 closes: vim/vim#16571 https://github.com/vim/vim/commit/f50d5364d790619a3b982a3ad3658b5a10daf511 Co-authored-by: Theodore Dubois <tblodt@icloud.com>
* fix(log): RPC log format #32337Justin M. Keyes2025-02-05
| | | | | | | | | | | | | Problem: RPC log messages show `log_notify` function name, which is not useful: DBG 2025-02-04T22:28:02.419 ui.37862 log_notify:57: RPC -> 3: [notify] nvim_ui_set_focus DBG 2025-02-04T22:28:02.419 nvim.37863.0 log_notify:57: RPC <- 1: [notify] nvim_ui_set_focus Solution: Call logmsg() directly. DBG 2025-02-04T22:42:00.104 ui.40680 RPC: -> 3: [notify] nvim_ui_attach DBG 2025-02-04T22:42:00.104 ui.40680 RPC: -> 3: [notify] nvim_set_client_info
* fix(messages): add a trailing space to inputlist() etc. prompts (#32328)zeertzjq2025-02-05
| | | | Before #31525 the prompts had a trailing space. Also add a test for #7857.
* vim-patch:9.1.1076: vim_strnchr() is strange and unnecessary (#32327)zeertzjq2025-02-05
| | | | | | | | | | | | | | | | | | | | | | Problem: vim_strnchr() is strange and unnecessary (after v9.1.1009) Solution: Remove vim_strnchr() and use memchr() instead. Also remove a comment referencing an #if that is no longer present. vim_strnchr() is strange in several ways: - It's named like vim_strchr(), but unlike vim_strchr() it doesn't support finding a multibyte char. - Its logic is similar to vim_strbyte(), but unlike vim_strbyte() it uses char instead of char_u. - It takes a pointer as its size argument, which isn't convenient for all its callers. - It allows embedded NULs, unlike other "strn*" functions which stop when encountering a NUL byte. In comparison, memchr() also allows embedded NULs, and it converts bytes in the string to (unsigned char). closes: vim/vim#16579 https://github.com/vim/vim/commit/34e1e8de91ff4a8922d454e3147ea425784aa0a0
* fix(event-loop): process input before events in getchar() (#32322)zeertzjq2025-02-05
| | | Follow-up to #27358.
* vim-patch:9.1.1027: no sanitize check when running linematchzeertzjq2025-02-04
| | | | | | | | | | | | Problem: no sanitize check when running linematch Solution: add sanitize check before applying the linematch algorithm, similar to diff_find_change() (Jonathon) closes: vim/vim#16446 https://github.com/vim/vim/commit/ca307efe486670b76563a4a287bc94dace57fb74 Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
* vim-patch:9.1.1023: Coverity complains about dereferencing NULL pointerzeertzjq2025-02-04
| | | | | | | | | | | Problem: Coverity complains about dereferencing NULL pointer Solution: Verify curdiff is not null before dereferencing it closes: vim/vim#16437 https://github.com/vim/vim/commit/a9f77be9223f8b886d89f7fac778d363586beb85 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1022: linematch option value not completedzeertzjq2025-02-04
| | | | | | | | | | | | | Problem: linematch option value not completed (after v9.1.1009) Solution: Update diffoption completion values related: vim/vim#9661 closes: vim/vim#16437 https://github.com/vim/vim/commit/9162e636b31dcac57876cbdec15a683cedd9760e Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1009: diff feature can be improvedzeertzjq2025-02-04
| | | | | | | | | | | | Problem: diff feature can be improved Solution: include the linematch diff alignment algorithm (Jonathon) closes: vim/vim#9661 https://github.com/vim/vim/commit/7c7a4e6d1ad50d5b25b42aa2d5a33a8d04a4cc8a Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
* vim-patch:9.1.1074: Strange error when heredoc marker starts with "trim" ↵zeertzjq2025-02-04
| | | | | | | | | | | | | | | | | (#32317) Problem: Strange error when heredoc marker starts with "trim". Solution: Check for whitespace after "trim" or "eval" (zeertzjq) For :python3 etc., a heredoc marker that starts with a lower-case letter is valid, and when it starts with "trim" it works in a script but not in a function, and this PR makes it works in a function. For :let, a heredoc marker that starts with a lower-case letter is not valid, but when it starts with "trim" or "eval" the error can be a bit confusing in a function, and this PR make it less confusing. closes: vim/vim#16574 https://github.com/vim/vim/commit/449c2e5454735fe1cfc8c21b2c6880d6bdf4cd6e
* fix(tui): cursor color in suckless terminal #32310uio232025-02-03
| | | | | | | | | | | | | Problem: 's 'guicursor' cursor color not working in suckless terminal (ST). Nvim's builtin terminfo for ST lacks a "Cs" entry, even though ST does support the cursor color to be set via termcodes. Solution: - In `augment_terminfo()`, assume that `st` always supports color cursor. - Thomas Dickey will add a "Cs" entry for st to ncurses, from which Nvim's builtin terminfos are generated. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:9.0.1391: "clear" macros are not always used (#32312)zeertzjq2025-02-03
| | | | | | | | | Problem: "clear" macros are not always used. Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more places. (Yegappan Lakshmanan, closes vim/vim#12104) https://github.com/vim/vim/commit/960dcbd098c761dd623bec9492d5391ff6e8dceb Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:8.2.4948: cannot use Perl heredoc in nested :def function (#32311)zeertzjq2025-02-03
| | | | | | | | | | Problem: Cannot use Perl heredoc in nested :def function. (Virginia Senioria) Solution: Only concatenate heredoc lines when not in a nested function. (closes vim/vim#10415) https://github.com/vim/vim/commit/d881d1598467d88808bafd2fa86982ebbca7dcc1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.1071: args missing after failing to redefine a functionzeertzjq2025-02-03
| | | | | | | | | | | | Problem: Arguments of a function are missing after failing to redefine it (after 8.2.2505), and heap-use-after-free with script-local function (after 9.1.1063). Solution: Don't clear arguments or free uf_name_exp when failing to redefine an existing function (zeertzjq) closes: vim/vim#16567 https://github.com/vim/vim/commit/04d2a3fdc051d6a419dc0ea4de7a9640cefccd31
* vim-patch:9.1.1066: heap-use-after-free and stack-use-after-scope with ↵zeertzjq2025-02-03
| | | | | | | | | | | | | :14verbose Problem: heap-use-after-free and stack-use-after-scope with :14verbose when using :return and :try (after 9.1.1063). Solution: Move back the vim_free(tofree) and the scope of numbuf[]. (zeertzjq) closes: vim/vim#16563 https://github.com/vim/vim/commit/2101230f4013860dbafcb0cab3f4e6bc92fb6f35
* vim-patch:9.1.1063: too many strlen() calls in userfunc.czeertzjq2025-02-03
| | | | | | | | | | | | | | | | | Problem: too many strlen() calls in userfunc.c Solution: refactor userfunc.c and remove calls to strlen(), drop set_ufunc_name() and roll it into alloc_ufunc(), check for out-of-memory condition in trans_function_name_ext() (John Marriott) closes: vim/vim#16537 https://github.com/vim/vim/commit/b32800f7c51c866dc0e87244eb4902540982309d Add missing change to call_user_func() from patch 8.1.1007. Consistently use PRIdSCID instead of PRId64 for script IDs. Co-authored-by: John Marriott <basilisk@internode.on.net>
* vim-patch:9.0.1142: crash and/or memory leak when redefining functionzeertzjq2025-02-03
| | | | | | | | | | Problem: Crash and/or memory leak when redefining function after error. Solution: Clear pointer after making a copy. Clear arrays on failure. (closes vim/vim#11774) https://github.com/vim/vim/commit/f057171d8b562c72334fd7c15c89ff787358ce3a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2505: Vim9: crash after defining function with invalid return typezeertzjq2025-02-03
| | | | | | | | | | | Problem: Vim9: crash after defining function with invalid return type. Solution: Clear function growarrays. Fix memory leak. https://github.com/vim/vim/commit/31842cd0772b557eb9584a13740430db29de8a51 Cherry-pick free_fp from patch 8.2.3812. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.1445: Vim9: function expanded name is cleared when sourcing againzeertzjq2025-02-03
| | | | | | | | | | | Problem: Vim9: function expanded name is cleared when sourcing a script again. Solution: Only clear the expanded name when deleting the function. (closes vim/vim#6707) https://github.com/vim/vim/commit/c4ce36d48698669f81ec90f7c9dc9ab8c362e538 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0825: def_function() may return pointer that was freedzeertzjq2025-02-03
| | | | | | | | | Problem: def_function() may return pointer that was freed. Solution: Set "fp" to NULL after freeing it. https://github.com/vim/vim/commit/a14e6975478adeddcc2161edc1ec611016aa89f3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.1070: Cannot control cursor positioning of getchar() (#32303)zeertzjq2025-02-03
| | | | | | | | | | Problem: Cannot control cursor positioning of getchar(). Solution: Add "cursor" flag to {opts}, with possible values "hide", "keep" and "msg". related: vim/vim#10603 closes: vim/vim#16569 https://github.com/vim/vim/commit/edf0f7db28f87611368e158210e58ed30f673098
* fix(statusline): overwriting stl_items with nvim_eval_statusline() {-item #32265luukvbaal2025-02-02
| | | | | | | | | | Problem: When an evaluation {-item calls `nvim_eval_statusline()`, that nested call may overwrite the same memory used for `stl_items`. Solution: Make `curitem` static and use it to compute an offset to avoid overwriting `stl_items` in nested calls to `build_stl_str_hl()`. Move miscellaneous statusline tests into `describe()` block.
* refactor(treesitter): always return valid range from parse() #32273Riley Bruins2025-02-02
| | | | | | | | | | | Problem: When running an initial parse, parse() returns an empty table rather than an actual range. In `languagetree.lua`, we manually check if a parse was incremental to determine the changed parse region. Solution: - Always return a range (in the C side) from parse(). - Simplify the language tree code a bit. - Logger no longer shows empty ranges on the initial parse.
* vim-patch:9.1.1069: preinsert text completions not deleted with <C-W>/<C-U> ↵glepnir2025-02-02
| | | | | | | | | | | | | (#32296) Problem: preinsert text completions not deleted with <C-W>/<C-U> (ddad431, after v9.1.1059) Solution: handle <C-W> or <C-U> specifically and clear the completion (glepnir) fixes: vim/vim#16557 closes: vim/vim#16565 https://github.com/vim/vim/commit/001c26cd6194fba2bfccb06dec30fdc9e1410e62
* vim-patch:9.1.1068: getchar() can't distinguish between C-I and Tab (#32295)zeertzjq2025-02-02
| | | | | | | | | | | | Problem: getchar() can't distinguish between C-I and Tab. Solution: Add {opts} to pass extra flags to getchar() and getcharstr(), with "number" and "simplify" keys. related: vim/vim#10603 closes: vim/vim#16554 https://github.com/vim/vim/commit/e0a2ab397fd13a71efec85b017d5d4d62baf7f63 Cherry-pick tv_dict_has_key() from patch 8.2.4683.
* refactor(autocmds): remove indirection #32291Justin M. Keyes2025-02-01
| | | | | | | | | | Problem: `AucmdExecutable` adds 2 layers of indirection. Although formalizing a `union` is good practice for shared interfaces, this struct is mainly for `autocmd_register` which is internal to this module. Solution: - Store the cmd/fn fields directly on the `AutoCmd` struct. - Drop `AucmdExecutable` and related structures.