aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | vim-patch:9.1.0956: completion may crash, completion highlight wrong with ↵glepnir2024-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | preview window Problem: completion may crash, completion highlight wrong with preview window (after v9.1.0954) Solution: correctly calculate scroll offset, check for preview window when adding extra highlighting (glepnir) when there have a preview window prepare_tagpreview will change curwin to preview window and this may cause ComplMatchIns check condition not correct. check wp is curwin and also the type of wp is not a preview or poup info fixes: https://github.com/vim/vim/issues/16284 closes: https://github.com/vim/vim/pull/16283 https://github.com/vim/vim/commit/8d0bb6dc9f2e5d94ebb59671d592c1b7fa325ca6
| * | vim-patch:9.1.0954: popupmenu.c can be improvedglepnir2024-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: popupmenu.c can be improved Solution: slightly refactor the logic (glepnir) closes: vim/vim#16271 Replace some if blocks and combine user attr abstract to an inline function. https://github.com/vim/vim/commit/89a107efd141d5a1fed850af80a74900077666cf Co-authored-by: glepnir <glephunter@gmail.com>
| * | fix(terminal): set cursor cell percentage (#31703)Gregory Anders2024-12-23
| | | | | | | | | Fixes: https://github.com/neovim/neovim/issues/31685
| * | fix(build): <termios.h> is system-dependent #31705Justin M. Keyes2024-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Since 2a7d0ed6145bf3f8b139c2694563f460f829813a, build fails with glibc version 2.28 / RHEL8 (where `termios.h` does not include unistd.h and is therefore missing `_POSIX_VDISABLE`): …/src/nvim/tui/termkey/termkey.c: In function 'termkey_start': …/src/nvim/tui/termkey/termkey.c:516:31: error: '_POSIX_VDISABLE' undeclared (first use in this function) 516 | termios.c_cc[VQUIT] = _POSIX_VDISABLE; | ^~~~~~~~~~~~~~~ …/src/nvim/tui/termkey/termkey.c:516:31: note: each undeclared identifier is reported only once for each function it appears in Solution: - Undo the `<termios.h>` change and mark the imports with `IWYU pragma: keep`.
| * | refactor(eval): move funcs to deprecated.c #31650Justin M. Keyes2024-12-23
| | |
| * | fix: fix broken wasmtime builddundargoc2024-12-23
| | | | | | | | | | | | | | | | | | Regression from 2a7d0ed6145bf3f8b139c2694563f460f829813a, which removed header that is only needed if wasmtime support is enabled. Prevent this from happening again by wrapping the include in a `HAVE_WASMTIME` check.
| * | refactor: iwyu #31637Justin M. Keyes2024-12-23
| | | | | | | | | Result of `make iwyu` (after some "fixups").
| * | Merge #31661 cmdline_show/hide eventsJustin M. Keyes2024-12-22
| |\ \
| | * | feat(ui): specify whether msg_show event is added to historyLuuk van Baal2024-12-23
| | | | | | | | | | | | | | | | | | | | Pass along whether message in msg_show event is added to the internal :messages history.
| | * | feat(ui): additional arguments for cmdline_show/hide eventsLuuk van Baal2024-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Unable to tell what highlight the prompt part of a cmdline_show event should have, and whether cmdline_hide was emitted after aborting. Solution: Add additional arguments hl_id to cmdline_show, and abort to cmdline_hide.
| * | | fix(messages): typo and unwanted truncation in msg_outtrans_long #31669luukvbaal2024-12-22
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | - Typo/bug in msg_outtrans_long passing string length as "hist" argument. - Avoid truncating message in msg_outtrans_long with ext_messages (followup to 1097d239c307a10a87fa995c4cfbe5987939e177). - Remove `_hl` from `msg_keep`, `smsg_keep` as there is no non-`_hl` variant. - `msg_printf_hl` is removed (identical to `smsg` except it sets `msg_scroll = true`, seemingly as a caveat to force a more prompt in cmdline mode). Move this logic to the only the only place this was used in ex_getln.c.
| * | fix(coverity): INTEGER_OVERFLOW #31657luukvbaal2024-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CID 516419: Integer handling issues (INTEGER_OVERFLOW) /src/nvim/message.c: 2242 in msg_puts_display() 2236 } 2237 // Concat pieces with the same highlight 2238 size_t len = maxlen < 0 ? strlen(str) : strnlen(str, (size_t)maxlen); 2239 ga_concat_len(&msg_ext_last_chunk, str, len); 2240 msg_ext_cur_len += len; 2241 // When message ends in newline, reset variables used to format message: msg_advance(). >>> CID 516419: Integer handling issues (INTEGER_OVERFLOW) >>> Expression "len - 1UL", which is equal to 18446744073709551615, where "len" is known to be equal to 0, underflows the type that receives it, an unsigned integer 64 bits wide. 2242 if (str[len - 1] == '\n') { 2243 msg_ext_cur_len = 0; 2244 msg_col = 0; 2245 } 2246 return; 2247 }
| * | fix(messages): no message kind for completion menu messages #31646Tomasz N2024-12-20
| | |
| * | vim-patch:9.1.0948: Missing cmdline completion for :pbuffer (#31645)zeertzjq2024-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Missing cmdline completion for :pbuffer. Solution: Add cmdline completion for :pbuffer like :buffer. (zeertzjq) fixes: vim/vim#16250 closes: vim/vim#16251 https://github.com/vim/vim/commit/3baf19a2b144b215c5b537c3c1b3b80a79b0fe99
| * | feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343Justin M. Keyes2024-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `termopen` has long been a superficial wrapper around `jobstart`, and has no real purpose. Also, `vim.system` and `nvim_open_term` presumably will replace all features of `jobstart` and `termopen`, so centralizing the logic will help with that. Solution: - Introduce `eval/deprecated.c`, where all deprecated eval funcs will live. - Introduce "term" flag of `jobstart`. - Deprecate `termopen`.
| * | docs(api): specify when decor provider on_buf is called #31634luukvbaal2024-12-19
| | |
| * | fix(messages): better formatting for :highlight with ext_messages #31627luukvbaal2024-12-19
| | | | | | | | | Also avoid going down message callstack with empty message, and remove expected grid for some tests where it did not change, and we are just testing for expected messages.
| * | vim-patch:9.1.0945: ComplMatchIns highlight doesn't end after inserted text ↵zeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31628) Problem: ComplMatchIns highlight doesn't end after inserted text. Solution: Handle ComplMatchIns highlight more like search highlight. Fix off-by-one error. Handle deleting text properly. (zeertzjq) closes: vim/vim#16244 https://github.com/vim/vim/commit/f25d8f9312a24da2727671560a865888812ab8d9
| * | fix(terminal): restore cursor from 'guicursor' on TermLeave (#31620)Gregory Anders2024-12-18
| | | | | | | | | Fixes: https://github.com/neovim/neovim/issues/31612
| * | fix(coverity): error handling CHECKED_RETURN #31618Justin M. Keyes2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CID 516406: Error handling issues (CHECKED_RETURN) /src/nvim/api/vimscript.c: 284 in nvim_call_dict_function() 278 Object rv = OBJECT_INIT; 279 280 typval_T rettv; 281 bool mustfree = false; 282 switch (dict.type) { 283 case kObjectTypeString: >>> CID 516406: Error handling issues (CHECKED_RETURN) >>> Calling "eval0" without checking return value (as is done elsewhere 10 out of 12 times). 284 TRY_WRAP(err, { 285 eval0(dict.data.string.data, &rettv, NULL, &EVALARG_EVALUATE); 286 clear_evalarg(&EVALARG_EVALUATE, NULL); 287 }); 288 if (ERROR_SET(err)) { 289 return rv;
| * | vim-patch:9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes ↵zeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | :normal (#31616) Problem: Wrong cursor shape with "gq" and 'indentexpr' executes :normal Solution: Update cursor and mouse shape after restoring old_State. (zeertzjq) closes: vim/vim#16241 Solution: Update cursor and mouse shape after restoring old_State. https://github.com/vim/vim/commit/6c3027744e71937b24829135ba072090d7d52bc3
| * | vim-patch:9.1.0941: ComplMatchIns doesn't work after multibyte charszeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ComplMatchIns doesn't work after multibyte chars (after v9.1.0936) Solution: Use (ptr - line) instead of wlv.col (zeertzjq). closes: vim/vim#16233 https://github.com/vim/vim/commit/f4ccada5c372b2c14cc32490860c6995cd00268c
| * | vim-patch:9.1.0936: cannot highlight completed textzeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot highlight completed text Solution: (optionally) highlight auto-completed text using the ComplMatchIns highlight group (glepnir) closes: vim/vim#16173 https://github.com/vim/vim/commit/6a38aff218f5b99a1aed7edaa357df24b9092734 Co-authored-by: glepnir <glephunter@gmail.com>
| * | feat(terminal)!: cursor shape and blink (#31562)Gregory Anders2024-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a terminal application running inside the terminal emulator sets the cursor shape or blink status of the cursor, update the cursor in the parent terminal to match. This removes the "virtual cursor" that has been in use by the terminal emulator since the beginning. The original rationale for using the virtual cursor was to avoid having to support additional UI methods to change the cursor color for other (non-TUI) UIs, instead relying on the TermCursor and TermCursorNC highlight groups. The TermCursor highlight group is now used in the default 'guicursor' value, which has a new entry for Terminal mode. However, the TermCursorNC highlight group is no longer supported: since terminal windows now use the real cursor, when the window is not focused there is no cursor displayed in the window at all, so there is nothing to highlight. Users can still use the StatusLineTermNC highlight group to differentiate non-focused terminal windows. BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.
| * | refactor(api): always use TRY_WRAP #31600luukvbaal2024-12-17
| | | | | | | | | | | | | | | | | | | | | Problem: Two separate try/end wrappers, that only marginally differ by restoring a few variables. Wrappers that don't restore previous state are dangerous to use in "api-fast" functions. Solution: Remove wrappers that don't restore the previous state. Always use TRY_WRAP.
| * | vim-patch:9.1.0934: hard to view an existing buffer in the preview window ↵zeertzjq2024-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31605) Problem: hard to view an existing buffer in the preview window Solution: add the :pbuffer command (Yinzuo Jiang) Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N] from the buffer list in the preview window. `:pbuffer` can also open special buffer, for example terminal buffer. closes: vim/vim#16222 https://github.com/vim/vim/commit/a2a2fe841ed2efdbb1f8055f752a3a4d0988ae9d Cherry-pick Test_popup_and_previewwindow_dump() changes from patch 9.0.0625. Cherry-pick Run_noroom_for_newwindow_test() changes from patches 8.2.0432 and 9.0.0363. Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
| * | vim-patch:9.1.0938: exclusive selection not respected when re-selecting ↵zeertzjq2024-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | block mode (#31603) Problem: exclusive selection not respected when re-selecting block mode (Matt Ellis) Solution: advance selection by another character when using selection=exclusive and visual block mode fixes: vim/vim#16202 closes: vim/vim#16219 https://github.com/vim/vim/commit/bb955894734b287abfadd3a25786a42038d18d61 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | fix(api): generic error messages, not using TRY_WRAP #31596Justin M. Keyes2024-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - API functions using `try_start` directly, do not surface the underlying error message, and instead show generic messages. - Error-handling code is duplicated in the API impl. - Failure modes are not tested. Solution: - Use `TRY_WRAP`. - Add tests.
| * | Merge pull request #31539 from bfredl/wininfobfredl2024-12-16
| |\| | | | | | | refactor(wininfo): change wininfo from a linked list to an array
| | * refactor(wininfo): change wininfo from a linked list to an arraybfredl2024-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "wininfo" is going to be my next victim. The main problem with wininfo is that it is "all or nothing", i e either all state about a buffer in a window is considered valid or none of it is. This needs to be fixed to address some long running grievances. For now this is just a warmup: refactor it from a linked list to a vector.
| * | fix(api): not using TRY_WRAP, generic error messages #31595Justin M. Keyes2024-12-16
| |/ | | | | | | | | | | | | | | | | | | | | Problem: - API functions using `try_start` directly instead of `TRY_WRAP`, do not surface the underlying error message, and instead show generic things like "Failed to set buffer". - Error handling code is duplicated in the API impl, instead of delegating to the vim buffer/window handling logic. Solution: - Use `TRY_WRAP`.
| * fix(messages): no message kind for :undo messages #31590Tomasz N2024-12-16
| | | | | | | | | | | | Problem: cannot handle `:undo` and `:redo` messages in a special way, e.g. replace one by another. Solution: add `undo` kind.
| * fix(api): nvim_win_set_buf(0, 0) fails if 'winfixbuf' is set #31576phanium2024-12-16
| | | | | | | | | | | | | | | | | | | | | | | | ## Problem With 'winfixbuf' enabled, `nvim_win_set_buf` and `nvim_set_current_buf` fail even if targeting the already-current buffer. vim.wo.winfixbuf = true vim.api.nvim_win_set_buf(0, 0) vim.api.nvim_set_current_buf(0) Solution: Check for this condition.
| * vim-patch:9.1.0927: style issues in insexpand.c (#31581)zeertzjq2024-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: style issues in insexpand.c Solution: add braces, use ternary operator to improve style (glepnir) closes: vim/vim#16210 https://github.com/vim/vim/commit/6e19993991cfbea2e00435cc706a15ba7e766c55 vim-patch:9.1.0922: wrong MIN macro in popupmenu.c vim-patch:9.1.0923: too many strlen() calls in filepath.c vim-patch:9.1.0924: patch 9.1.0923 causes issues Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:ed89206: runtime(doc): add a note about inclusive motions and ↵zeertzjq2024-12-15
| | | | | | | | | | | | | | | | | | | | exclusive selection related: vim/vim#16202 https://github.com/vim/vim/commit/ed89206efe404a94e8424ccfe03c978fd93470f1 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * feat(ui): sign/statuscolumn can combine highlight attrs #31575luukvbaal2024-12-14
| | | | | | | | | | | | | | | | Problem: Since e049c6e4c08a, most statusline-like UI elements can combine highlight attrs, except for sign/statuscolumn. Solution: Implement for sign/statuscolumn.
| * docs(annotations): added `---@generic` supportColin Kennedy2024-12-13
| |
| * vim-patch:9.1.092: vim-patch:9.1.0923: wrong MIN macro in popupmenu.czeertzjq2024-12-13
| | | | | | | | | | | | | | | | | | | | | | Problem: wrong MIN macro in popupmenu.c (after v9.1.0921) (zeertzjq) Solution: change it to MAX() https://github.com/vim/vim/commit/618c4d36ca92a62212a37e787c202229ceff8537 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.0921: popupmenu logic is a bit convolutedzeertzjq2024-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: popupmenu logic is a bit convoluted Solution: slightly refactor logic and use MIN/MAX() macros to simplify (glepnir) Define the MAX/MIN macros. Since we support some older platforms, C compilers may not be as smart. This helps reduce unnecessary if statements and redundant ternary expressions. Pre-calculate some expressions by defining variables. Remove unnecessary parentheses. Adjust certain lines to avoid exceeding 80 columns. closes: vim/vim#16205 https://github.com/vim/vim/commit/c942f84aadffd0c8969ecf81e3e9103722b2714f Co-authored-by: glepnir <glephunter@gmail.com>
| * fix(float): re-sort layers when grid zindex changed #30259glepnir2024-12-12
| | | | | | | | | | | | Problem: when zindex is changed in vim.schedule the zindex sort in layers not changed. Solution: resort layers when zindex changed.
| * fix(float): close preview float window when no selected #29745glepnir2024-12-11
| | | | | | | | | | | | | | Problem: Float preview window still exist when back at original. Or no info item is selected. Solution: if selected is -1 or no info is selected, if float preview window exist close it first.
| * docs(annotation): return types for Vimscript functions #31546Colin Kennedy2024-12-11
| |
| * feat(lsp): add vim.lsp.config and vim.lsp.enableLewis Russell2024-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Design goals/requirements: - Default configuration of a server can be distributed across multiple sources. - And via RTP discovery. - Default configuration can be specified for all servers. - Configuration _can_ be project specific. Solution: - Two new API's: - `vim.lsp.config(name, cfg)`: - Used to define default configurations for servers of name. - Can be used like a table or called as a function. - Use `vim.lsp.confg('*', cfg)` to specify default config for all servers. - `vim.lsp.enable(name)` - Used to enable servers of name. Uses configuration defined via `vim.lsp.config()`.
| * fix(messages): no message kind for :write messages #31519Tomasz N2024-12-10
| | | | | | | | - Problem: cannot replace the initial bufwrite message (from `filemess`) by the final one (`"test.lua" [New] 0L, 0B written`), when using `vim.ui_attach`. - Solution: add kind to both messages.
| * Merge pull request #30869 from vanaigr/decor_long_lines_perfbfredl2024-12-10
| |\ | | | | | | perf(decor): improve performance for long lines
| | * refactor: comments, variable namesvanaigr2024-12-05
| | |
| | * docs: add comments for DecorRangeSlot structvanaigr2024-12-05
| | |
| | * perf: consider only active decorations when drawing linesvanaigr2024-12-05
| | |
| * | fix(ui): update title in more cases (#31508)zeertzjq2024-12-10
| | |
| * | vim-patch:9.1.0917: various vartabstop and shiftround bugs when shifting lineszeertzjq2024-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: various vartabstop and shiftround bugs when shifting lines Solution: Fix the bugs, add new tests for shifting lines in various ways (Gary Johnson) fixes: vim/vim#14891 closes: vim/vim#16193 https://github.com/vim/vim/commit/eed63f96d26723ff31a9728647eed526d06a553d Co-authored-by: Gary Johnson <garyjohn@spocom.com>