aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
Commit message (Collapse)AuthorAge
...
| * | fix(shada): restore search pattern length properly (#28929)zeertzjq2024-05-23
| | |
| * | vim-patch:9.0.1175: the set_ref_in_item() function is too long (#28926)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The set_ref_in_item() function is too long. Solution: Use a separate function for more complicated types. (Yegappan Lakshmanan, closes vim/vim#11802) https://github.com/vim/vim/commit/ea125393af01ecaf75cee8e085a57f8143f3ae3e Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:8.2.0703: Vim9: closure cannot store value in outer context (#28925)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: closure cannot store value in outer context. Solution: Make storing value in outer context work. Make :disassemble accept a function reference. https://github.com/vim/vim/commit/b68b346e6db6d3f848e0a89905fcd7777b73c5d8 Funcstack is Vim9script-only. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | vim-patch:9.1.0430: getregionpos() doesn't handle one char selection (#28924)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregionpos() doesn't handle one char selection. Solution: Handle startspaces differently when is_oneChar is set. Also add a test for an exclusive charwise selection with multibyte chars (zeertzjq) closes: vim/vim#14825 https://github.com/vim/vim/commit/52a6f348874778cf315b47d9e8b5f818f4b97277
| * | vim-patch:9.1.0428: Tag guessing leaves wrong search history with very short ↵zeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | names Problem: Tag guessing leaves wrong search history with very short names (after 9.1.0426). Solution: Use the correct variable for pattern length (zeertzjq). closes: vim/vim#14817 https://github.com/vim/vim/commit/42cd192daa4b7f29131c7be1beaecb6067e96266 Cherry-pick Test_tagbsearch() changes from patch 9.0.0767.
| * | vim-patch:9.1.0426: too many strlen() calls in search.czeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 https://github.com/vim/vim/commit/8c85a2a49acf80e4f53ec51e6ff2a5f3830eeddb Co-authored-by: John Marriott <basilisk@internode.on.net>
| * | feat(signs)!: place higher-priority signs from the left #27781Tobias Schmitz2024-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Higher-priority signs may be hidden by lower-priority signs. Solution: Place higher-priority signs from the left. Example: nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='H', priority=1}) nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='W', priority=2}) nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='E', priority=3}) Before: | | H | W E | ^ | | Not visible After: | | | E W | H | | ^ Not visible Fixes #16632
| * | fix(tui): remove duplicate disabling of synchronized output (#28884)zeertzjq2024-05-21
| | | | | | | | | Synchronized output is enabled and disabled inside flush_buf().
| * | vim-patch:8.2.1520: Vim9: CTRL-] used in :def function does not work (#28880)zeertzjq2024-05-21
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: CTRL-] used in :def function does not work. Solution: Omit count or prepend colon. (closes vim/vim#6769) https://github.com/vim/vim/commit/b3ea36c5bcb88b6a05a66347eedd461e9385103f Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | vim-patch:9.1.0423: getregionpos() wrong with blockwise mode and multibytezeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregionpos() wrong with blockwise mode and multibyte. Solution: Use textcol and textlen instead of start_vcol and end_vcol. Handle coladd properly (zeertzjq). Also remove unnecessary buflist_findnr() in add_regionpos_range(), as getregionpos() has already switched buffer. closes: vim/vim#14805 https://github.com/vim/vim/commit/c95e64f41f7f6d1bdc95b047ae9b369743c8637b
| * | vim-patch:9.1.0395: getregionpos() may leak memory on errorzeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: regionpos may leak memory on error, coverity complains about dereferencing Null pointer Solution: free all list pointers (after v9.1.394), return early if buflist_findnr() returns NULL closes: vim/vim#14731 https://github.com/vim/vim/commit/b8ecedce79149ac6b994177e9a68979f86065cb1 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | vim-patch:9.1.0394: Cannot get a list of positions describing a regionzeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot get a list of positions describing a region (Justin M. Keyes, after v9.1.0120) Solution: Add the getregionpos() function (Shougo Matsushita) fixes: vim/vim#14609 closes: vim/vim#14617 https://github.com/vim/vim/commit/b4757e627e6c83d1c8e5535d4887a82d6a5efdd0 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * | vim-patch:9.1.0409: too many strlen() calls in the regexp engine (#28857)zeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in the regexp engine Solution: refactor code to retrieve strlen differently, make use of bsearch() for getting the character class (John Marriott) closes: vim/vim#14648 https://github.com/vim/vim/commit/82792db6315f7c7b0e299cdde1566f2932a463f8 Cherry-pick keyvalue_T and its comparison functions from patch 9.1.0256. vim-patch:9.1.0410: warning about uninitialized variable vim-patch:9.1.0412: typo in regexp_bt.c in DEBUG code Co-authored-by: John Marriott <basilisk@internode.on.net>
| * | refactor(path.c): add nonnull attributes (#28829)zeertzjq2024-05-19
| | | | | | | | | This possibly fixes the coverity warning.
| * | vim-patch:9.1.0418: Cannot move to previous/next rare word (#28822)zeertzjq2024-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot move to previous/next rare word (Colin Kennedy) Solution: Add the ]r and [r motions (Christ van Willegen) fixes: vim/vim#14773 closes: vim/vim#14780 https://github.com/vim/vim/commit/8e4c4c7d87def2b100a5d64dc518ef85d9de8765 Co-authored-by: Christ van Willegen - van Noort <github.com@vanwillegen-vannoort.nl>
| * | fix(move): half-page scrolling with resized grid at eob (#28821)zeertzjq2024-05-18
| | |
| * | Merge pull request #28790 from luukvbaal/vim-9.1.0414zeertzjq2024-05-18
| |\ \ | | | | | | | | vim-patch:9.1.{0414,0416}
| | * | vim-patch:9.1.0414: Unable to leave long line with 'smoothscroll' and ↵Luuk van Baal2024-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'scrolloff' Problem: Unable to leave long line with 'smoothscroll' and 'scrolloff'. Corrupted screen near the end of a long line with 'scrolloff'. (Ernie Rael, after 9.1.0280) Solution: Only correct cursor in case scroll_cursor_bot() was not itself called to make the cursor visible. Avoid adjusting for 'scrolloff' beyond the text line height (Luuk van Baal) https://github.com/vim/vim/commit/b32055e504ebd4f6183a93b92b08d61dad61c841 vim-patch:9.1.0416: some screen dump tests can be improved Problem: some screen dump tests can be improved (after 9.1.0414) Solution: Make sure screen state changes properly and is captured in the screen dumps (Luuk van Baal) https://github.com/vim/vim/commit/2e642734f4be506483315b8881748a7ef45854f4
| * | | feat(api): broadcast events to ALL channels #28487Justin M. Keyes2024-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `vim.rpcnotify(0)` and `rpcnotify(0)` are documented as follows: If {channel} is 0, the event is broadcast to all channels. But that's not actually true. Channels must call `nvim_subscribe` to receive "broadcast" events, so it's actually "multicast". - Assuming there is a use-case for "broadcast", the current model adds an extra step for broadcasting: all channels need to "subscribe". - The presence of `nvim_subscribe` is a source of confusion for users, because its name implies something more generally useful than what it does. Presumably the use-case of `nvim_subscribe` is to avoid "noise" on RPC channels not expected a broadcast notification, and potentially an error if the channel client reports an unknown event. Solution: - Deprecate `nvim_subscribe`/`nvim_unsubscribe`. - If applications want to multicast, they can keep their own multicast list. Or they can use `nvim_list_chans()` and `nvim_get_chan_info()` to enumerate and filter the clients they want to target. - Always send "broadcast" events to ALL channels. Don't require channels to "subscribe" to receive broadcasts. This matches the documented behavior of `rpcnotify()`.
| * | | fix(path): avoid chdir() when resolving path (#28799)zeertzjq2024-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use uv_fs_realpath() instead. It seems that uv_fs_realpath() has some problems on non-Linux platforms: - macOS and other BSDs: this function will fail with UV_ELOOP if more than 32 symlinks are found while resolving the given path. This limit is hardcoded and cannot be sidestepped. - Windows: while this function works in the common case, there are a number of corner cases where it doesn't: - Paths in ramdisk volumes created by tools which sidestep the Volume Manager (such as ImDisk) cannot be resolved. - Inconsistent casing when using drive letters. - Resolved path bypasses subst'd drives. Ref: https://docs.libuv.org/en/v1.x/fs.html#c.uv_fs_realpath I don't know if the old implementation that uses uv_chdir() and uv_cwd() also suffers from the same problems. - For the ELOOP case, chdir() seems to have the same limitations. - On Windows, Vim doesn't use anything like chdir() either. It uses _wfullpath(), while libuv uses GetFinalPathNameByHandleW().
| * | | fix(version): fix vim.version().prereleasebfredl2024-05-16
| |/ / | | | | | | | | | fixes #28782 (when backported)
| * | perf(treesitter): use child_containing_descendant() in has-ancestor? (#28512)vanaigr2024-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `has-ancestor?` is O(n²) for the depth of the tree since it iterates over each of the node's ancestors (bottom-up), and each ancestor takes O(n) time. This happens because tree-sitter's nodes don't store their parent nodes, and the tree is searched (top-down) each time a new parent is requested. Solution: Make use of new `ts_node_child_containing_descendant()` in tree-sitter v0.22.6 (which is now the minimum required version) to rewrite the `has-ancestor?` predicate in C to become O(n). For a sample file, decreases the time taken by `has-ancestor?` from 360ms to 6ms.
| * | vim-patch:5faeb60480c6 (#28768)zeertzjq2024-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): clarify {special} argument for shellescape() closes: vim/vim#14770 https://github.com/vim/vim/commit/5faeb60480c6efba5c0468c01275120b6ace5a09 N/A patch: vim-patch:c0e038b59f84 Co-authored-by: Enno <Konfekt@users.noreply.github.com>
| * | vim-patch:9.1.0413: smoothscroll may cause infinite loop (#28763)zeertzjq2024-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: smoothscroll may cause infinite loop, with very narrow windows (Jaehwang Jung, after v9.1.0280) Solution: Check for width1 being negative, verify that win_linetabsize does not overflow fixes: vim/vim#14750 closes: vim/vim#14772 https://github.com/vim/vim/commit/eff20eb35d2dba413c6d115291dd9ddea705e802 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | fix(messages): avoid passing negative length to strnlen() (#28753)zeertzjq2024-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Compiler warning when building Nvim in Release mode: In function ‘msg_puts_display’, inlined from ‘disp_sb_line’ at **/src/nvim/message.c:2647:5: **/src/nvim/message.c:2165:18: warning: ‘strnlen’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overread] 2165 | size_t len = strnlen(str, (size_t)maxlen); | ^ Solution: Use strlen() when maxlen is negative.
| * | docs: misc (#28609)dundargoc2024-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/neovim/neovim/issues/28484. Closes https://github.com/neovim/neovim/issues/28719. Co-authored-by: Chris <crwebb85@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Jake B <16889000+jakethedev@users.noreply.github.com> Co-authored-by: Jonathan Raines <jonathan.s.raines@gmail.com> Co-authored-by: Yi Ming <ofseed@foxmail.com> Co-authored-by: Zane Dufour <zane@znd4.me> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | refactor(api): nvim_win_xx_ns are EXPERIMENTALJustin M. Keyes2024-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The nvim_win_xx_ns function family introduced in ba0370b1d718d473d0ef51c35d88b98ba220082b needs more bake-time. Currently it's narrowly defined for windows, but other scopes ("buffer") and features are likely in the future. Solution: - Rename the API with double-underscore to mark it as EXPERIMENTAL. TODO/FUTURE: - Rename and change the signature to support more than just "window" scope, and for other flexibility. - Open question: we could choose either: - "store scopes on namespaces", or - "store namespaces on scopes (w:/b:/…)"
| * | refactor(api): rename nvim_win_remove_nsJustin M. Keyes2024-05-12
| | | | | | | | | | | | | | | | | | | | | | | | Problem: nvim_win_remove_ns does not follow `help dev-naming` API naming conventions. Solution: Rename it.
| * | Merge pull request #28717 from bfredl/rpcmsgbfredl2024-05-12
| |\ \ | | |/ | |/| fix(ui): data corruption in remote_ui_raw_line
| | * fix(ui): data corruption in remote_ui_raw_linebfredl2024-05-12
| | | | | | | | | | | | | | | | | | This particular repro is quite niche but there could be other cases, whenever the the second last cell plus the "fill" cell togheter are too complex
| * | fix(api): make getting explicit empty hl in virtual text work (#28697)zeertzjq2024-05-12
| |/
| * vim-patch:9.1.0407: Stuck with long line and half-page scrolling (#28704)luukvbaal2024-05-11
| | | | | | | | | | | | | | | | | | | | Problem: No scrolling happens with half-page scrolling with line filling entire window when 'smoothscroll' is disabled. (Mathias Rav, after v9.1.0285) Solution: Adjust amount to move cursor by so that it is moved the same number of lines as was scrolled, even when scrolling different number of lines than requested with 'nosmoothscroll'. https://github.com/vim/vim/commit/58448e09be497a8abb595ae309b6edfbc8e0e05a
| * vim-patch:9.1.0406: Divide by zero with getmousepos() and 'smoothscroll' ↵zeertzjq2024-05-11
| | | | | | | | | | | | | | | | | | | | | | (#28701) Problem: Divide by zero with getmousepos() and 'smoothscroll'. Solution: Don't compute skip_lines when width1 is zero. (zeertzjq) closes: vim/vim#14747 https://github.com/vim/vim/commit/031a745608d615d56f9d79bb0f76e2a74b2eaf14
| * fix: transposed xcalloc arguments (#28695)zeertzjq2024-05-11
| |
| * Merge pull request #28676 from luukvbaal/tuiflushbfredl2024-05-10
| |\ | | | | | | fix(tui): initialize clear attrs with current terminal background
| | * fix(tui): initialize clear attrs with current terminal backgroundLuuk van Baal2024-05-10
| | | | | | | | | | | | | | | | | | | | | Problem: Invalidated regions that are flushed during startup are cleared with unitialized "clear_attrs", which is perceived as flickering. Solution: Initialize "clear_attrs" with current terminal background color.
| * | vim-patch:9.1.0397: Wrong display with 'smoothscroll' when changing quickfix ↵zeertzjq2024-05-09
| |/ | | | | | | | | | | | | | | | | | | list (#28674) Problem: Wrong display with 'smoothscroll' when changing quickfix list. Solution: Reset w_skipcol when replacing quickfix list (zeertzjq). closes: vim/vim#14730 https://github.com/vim/vim/commit/c7a8eb5ff2ddd919e6f39faec93d81c52874695a
| * refactor(change): check all tabpages in changed_lines_invalidate_buf() (#28666)zeertzjq2024-05-08
| | | | | | | | | | This most likely doesn't matter as all windows are redrawn when switching tabpages and w_valid is reset is entering window, but still check all tabpages for consistency with changed_common().
| * refactor(fold): avoid coverity false-positiveJaehwang Jung2024-05-07
| | | | | | | | Also add some more argument checks.
| * docs: fix lua type warnings (#28633)Maria José Solano2024-05-05
| |
| * vim-patch:ad4881cb3c04 (#28636)zeertzjq2024-05-04
| | | | | | | | | | | | | | runtime(doc): correct getscriptinfo() example (vim/vim#14718) When "sid" is specified, it returns a List with a single item. https://github.com/vim/vim/commit/ad4881cb3c04048242f69dc77af2dde889c9beea
| * perf(extmarks): better track whether namespace has extmarks (#28615)zeertzjq2024-05-03
| | | | | | | | | | | | This avoids redraw when adding/removing an empty namespace for a window. This also avoids marktree traversal when clearing a namespace that has already been cleared, which is added as a benchmark.
| * fix(api): use correct buffer for "range" in nvim__redraw (#28614)luukvbaal2024-05-03
| |
| * feat(api): add nvim__redraw for more granular redrawingLuuk van Baal2024-05-02
| | | | | | | | | | | | | | | | | | | | | | Experimental and subject to future changes. Add a way to redraw certain elements that are not redrawn while Nvim is waiting for input, or currently have no API to do so. This API covers all that can be done with the :redraw* commands, in addition to the following new features: - Immediately move the cursor to a (non-current) window. - Target a specific window or buffer to mark for redraw. - Mark a buffer range for redraw (replaces nvim__buf_redraw_range()). - Redraw the 'statuscolumn'.
| * refactor: add win_T argument to setcursor_mayforce()Luuk van Baal2024-05-02
| |
| * vim-patch:9.1.0388: cursor() and getregion() don't handle v:maxcol well (#28602)zeertzjq2024-05-02
| | | | | | | | | | | | | | | | | | Problem: cursor() and getregion() don't handle v:maxcol well. Solution: Add special handling for v:maxcol like setpos() does. (zeertzjq) closes: vim/vim#14698 https://github.com/vim/vim/commit/2ffdae79487cb7e323383eda9ae96c2e9d1625bd
| * fix(colorscheme): add missing LSP groupsEvgeni Chasnovski2024-05-02
| |
| * fix(ui): avoid recursiveness and invalid memory access #28578luukvbaal2024-05-01
| | | | | | | | | | | | | | | | Problem: Calling :redraw from vim.ui_attach() callback results in recursive cmdline/message events. Solution: Avoid recursiveness where possible and replace global "call_buf" with separate, temporary buffers for each event so that when a Lua callback for one event fires another event, that does not result in invalid memory access.
| * revert: "feat(extmarks): subpriorities (relative to declaration order) ↵Gregory Anders2024-05-01
| | | | | | | | | | | | | | | | | | | | | | | | (#27131)" (#28585) This reverts commit 15e77a56b711102fdc123e15b3f37d49bc0b1df1. Subpriorities were added in https://github.com/neovim/neovim/pull/27131 as a mechanism for enforcing query order when using iter_matches in the Tree-sitter highlighter. However, iter_matches proved to have too many complications to use in the highlighter so we eventually reverted back to using iter_captures (https://github.com/neovim/neovim/pull/27901). Thus, subpriorities are no longer needed and can be removed.
| * docs(api): sort unreleased nvim__ functions last #28580Justin M. Keyes2024-04-30
| |