aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
Commit message (Collapse)AuthorAge
...
| * | fix(lua): only free luarefs when returning from API (#28373)zeertzjq2024-04-17
| |/
| * feat(defaults): use ripgrep (rg) for 'grepprg' if availableLuna Saphie Mittelbach2024-04-16
| |
| * fix(api): ignore 'autochdir' when renaming other buf (#28376)zeertzjq2024-04-16
| | | | | | | | | | | | Problem: Renaming non-current buffer changes working directory when 'autochdir' is set. Solution: Temporarily disable 'autochdir'. Add more tests for the win_set_buf change.
| * fix(api): ignore 'autochdir' when setting buf in other win (#28371)Raphael2024-04-16
| | | | | | | | | | Problem: Wrong working directory when setting buffer in another window with 'autochdir' enabled. Solution: Temporarily disable 'autochdir'.
| * test: make mapping tests more consistent (#28368)zeertzjq2024-04-16
| | | | | | | | | | | | - Test maparg() and maplist() in the same test. - Use matches() instead of string.match(). - Avoid overlong lines and strange spacing in exec_lua(). - Revert code change from last PR as the variable may be needed.
| * test: getting autocmd Lua callback in Vimscript (#28367)zeertzjq2024-04-16
| | | | | | Also remove unnecessary variable in API converter.
| * fix(messages): avoid crash with :intro and ch=0 (#28343)zeertzjq2024-04-16
| | | | | | | | This just copies code from msg_start() to wait_return(). Not sure if there is a better place to put such a block.
| * vim-patch:9.1.0335: String interpolation fails for List type (#28364)zeertzjq2024-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: String interpolation fails for List type Solution: use implicit string(list) for string interpolation and :put = (Yegappan Lakshmanan) related: vim/vim#14529 closes: vim/vim#14556 https://github.com/vim/vim/commit/bce51d9005dd1c5bc002acbac2e12b649abcb013 Cherry-pick eval_to_string_eap() from patch 8.2.1914. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * fix(base64): properly handle embedded NULLs when decoding (#28349)Gregory Anders2024-04-15
| |
| * fix(api): make width/height for split by nvim_open_win work (#28341)zeertzjq2024-04-15
| |
| * vim-patch:9.1.0329: String interpolation fails for Dict type (#28335)zeertzjq2024-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: String interpolation fails for Dict type Solution: Support Dict data type properly, also support :put =Dict (without having to convert it to string() first) (Yegappan Lakshmanan) fixes: vim/vim#14529 closes: vim/vim#14541 https://github.com/vim/vim/commit/f01493c55062c01b1cdf9b1e946577f4d1bdddf3 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * feat(api)!: nvim_open_win: noautocmd blocks all autocmds #28192Sean Dewar2024-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: noautocmd is confusing; despite its name, it doesn't block all autocommands (instead it blocks only those related to setting the buffer), and is commonly used by plugins to open windows while producing minimal side-effects. Solution: be consistent and block all autocommands when noautocmd is set. This includes WinNew (again), plus autocommands from entering the window (if enter is set) like WinEnter, WinLeave, TabEnter, .etc. See the discussion at https://github.com/neovim/neovim/pull/14659#issuecomment-2040029517 for more information. Remove win_set_buf's noautocmd argument, as it's no longer needed. NOTE: pum_create_float_preview sets noautocmd for win_set_buf, but all its callers already use block_autocmds. Despite that, pum_create_float_preview doesn't actually properly handle autocommands (it has no checks for whether those from win_enter or nvim_create_buf free the window). For now, ensure autocommands are blocked within it for correctness (in case it's ever called outside of a block_autocmds context; the function seems to have been refactored in #26739 anyway).
| * vim-patch:9.1.0320: Wrong cursor position after using setcellwidths() (#28334)zeertzjq2024-04-15
| | | | | | | | | | | | | | | | | | | | | | Problem: Wrong cursor position after using setcellwidths(). Solution: Invalidate cursor position in addition to redrawing. (zeertzjq) closes: vim/vim#14545 https://github.com/vim/vim/commit/05aacec6ab5c7ed8a13bbdca2f0005d6a1816230 Reorder functions in test_utf8.vim to match upstream.
| * refactor: fix clang NonNullParamChecker warnings (#28327)zeertzjq2024-04-14
| |
| * fix(tui): make setcellwidths() work for non-ambiwidth chars (#28322)zeertzjq2024-04-14
| |
| * vim-patch:9.1.0313: Crash when using heredoc with comment in command blockzeertzjq2024-04-14
| | | | | | | | | | | | | | | | | | | | Problem: Crash when using heredoc with comment in command block. Solution: Handle a newline more like the end of the line, fix coverity warning (zeertzjq). closes: vim/vim#14535 https://github.com/vim/vim/commit/1f5175d9af3d3f37e19f23e0e6f84caec47390f2
| * vim-patch:9.1.0312: heredocs are not supported for :commandszeertzjq2024-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: heredocs are not supported for :commands (balki) Solution: Add heredoc support (Yegappan Lakshmanan) fixes: vim/vim#14491 closes: vim/vim#14528 https://github.com/vim/vim/commit/e74cad3321ce1dcefc1fc64f617511275b6cd930 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * fix(float): improve error message when reconfig failed (#25076)Raphael2024-04-13
| | | | | | | | Problem: The current error message isn't very accurate. Solution: Improve the error message.
| * fix(path): check return value of append_path() (#28309)Joey Gouly2024-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the filename passed to vim_FullName() is a relative directory, and does not exist, it is appended to the current working directory. Since the return value of append_path() was ignored, and if the buffer length was too small to fit getcwd() + dirname(filename), it would still try to append the basename(filename). This was manifesting as a failure in test/unit/path_spec.lua in: itp('fails and uses filename if given filename contains non-existing directory', .. This failure occurs when running the tests from directory with a short path such as: /work/src/nv test/unit/path_spec.lua:420: Expected objects to be the same. Passed in: (string) '/work/src/nv/test.file' Expected: (string) 'non_existing_dir/test.file' This return value for the second call to append_path() to append basename(filename) was checked, and this is where it would fail for normal / longer getcwd()s.
| * fix(move): fix using the wrong window (#28312)zeertzjq2024-04-13
| |
| * vim-patch:9.0.2180: POSIX function name in exarg causes issues (#28308)zeertzjq2024-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: POSIX function name in exarg struct causes issues on OpenVMS Solution: Rename getline member in exarg struct to ea_getline, remove isinf() workaround for VMS There are compilers that do not treat well POSIX functions - like getline - usage in the structs. Older VMS compilers could digest this... but the newer OpenVMS compilers ( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these structs. This could be limited to getline() that is defined via getdelim() and might not affect all POSIX functions in general - but avoiding POSIX function names usage in the structs is a "safe side" practice without compromising the functionality or the code readability. The previous OpenVMS X86 port used a workaround limiting the compiler capabilities using __CRTL_VER_OVERRIDE=80400000 In order to make the OpenVMS port future proof, this pull request proposes a possible solution. closes: vim/vim#13704 https://github.com/vim/vim/commit/6fdb6280821a822768df5689a5d727e37d38306c Co-authored-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
| * fix(move): check for filler lines properly (#28307)zeertzjq2024-04-13
| | | | | | vim-patch:9.1.0310: Filler lines not checked properly in get_scroll_overlap()
| * Merge pull request #26774 from glepnir/24129bfredl2024-04-12
| |\ | | | | | | fix(float): don't relative float win itself
| | * fix(float): don't relative flaot win itselfglepnir2024-04-10
| | | | | | | | | | | | | | | | | | Problem: when reconfig current float win without win key in nvim_win_set_config will cause float win position changed when move. Solution: don't relative itself.
| * | vim-patch:9.0.2114: overflow detection not accurate when adding digits (#28271)zeertzjq2024-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: overflow detection not accurate when adding digits Solution: Use a helper function Use a helper function to better detect overflows before adding integer digits to a long or an integer variable respectively. Signal the overflow to the caller function. closes: vim/vim#13539 https://github.com/vim/vim/commit/22cbc8a4e17ce61aa460c451a26e1bff2c3d2af9 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | vim-patch:9.1.0297: Patch 9.1.0296 causes too many issues (#28263)zeertzjq2024-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Patch 9.1.0296 causes too many issues (Tony Mechelynck, chdiza, CI) Solution: Back out the change for now Revert "patch 9.1.0296: regexp: engines do not handle case-folding well" This reverts commit 7a27c108e0509f3255ebdcb6558e896c223e4d23 it causes issues with syntax highlighting and breaks the FreeBSD and MacOS CI. It needs more work. fixes: vim/vim#14487 https://github.com/vim/vim/commit/c97f4d61cde24030f2f7d2318e1b409a0ccc3e43 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | vim-patch:9.1.0301: Vim9: heredoc start may be recognized in string (#28266)zeertzjq2024-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: heredoc start may be recognized in string. Solution: Don't skip to closing bracket for invalid list assignment. (zeertzjq) closes: vim/vim#14472 https://github.com/vim/vim/commit/1817ccdb107ceeaf5c48fe193da5146682c15ca6
| * | fix(drawline): don't invoke on_line for filler line (#28219)Jaehwang Jung2024-04-10
| |/ | | | | | | | | | | | | | | | | Problem: Decoration provider `on_line` handler is invoked for diff filler line below the last buffer line. This does not match the documentation: "called for each buffer line". Solution: Check `end_fill`.
| * fix(prompt): emit change event for prompt newline (#28260)zeertzjq2024-04-10
| | | | | | Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
| * vim-patch:9.1.0296: regexp: engines do not handle case-folding well (#28259)zeertzjq2024-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Regex engines do not handle case-folding well Solution: Correctly calculate byte length of characters to skip When the regexp engine compares two utf-8 codepoints case insensitively it may match an adjacent character, because it assumes it can step over as many bytes as the pattern contains. This however is not necessarily true because of case-folding, a multi-byte UTF-8 character can be considered equal to some single-byte value. Let's consider the pattern 'ſ' and the string 's'. When comparing and ignoring case, the single character 's' matches, and since it matches Vim will try to step over the match (by the amount of bytes of the pattern), assuming that since it matches, the length of both strings is the same. However in that case, it should only step over the single byte value 's' so by 1 byte and try to start matching after it again. So for the backtracking engine we need to ensure: - we try to match the correct length for the pattern and the text - in case of a match, we step over it correctly The same thing can happen for the NFA engine, when skipping to the next character to test for a match. We are skipping over the regstart pointer, however we do not consider the case that because of case-folding we may need to adjust the number of bytes to skip over. So this needs to be adjusted in find_match_text() as well. A related issue turned out, when prog->match_text is actually empty. In that case we should try to find the next match and skip this condition. fixes: vim/vim#14294 closes: vim/vim#14433 https://github.com/vim/vim/commit/7a27c108e0509f3255ebdcb6558e896c223e4d23 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.1.0287: Vim9: comment may be treated as heredoc start (#28257)zeertzjq2024-04-10
| | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: comment may be treated as heredoc start. (Ernie Rael) Solution: Use skip_var_list() instead of find_name_end(). (zeertzjq) fixes: vim/vim#14444 closes: vim/vim#14446 https://github.com/vim/vim/commit/9a91d2b72c20f213bbf77f27b7edd01e0e43d5e0
| * vim-patch:9.1.0294: Text height function does not respect it's argumentLuuk van Baal2024-04-09
| | | | | | | | | | | | | | | | | | | | Problem: plines_m_win() does not take into account it's "limit_winheight" argument for filler lines below the last line of the buffer. (after v9.1.0280) Solution: Check window height when "limit_winheight" is TRUE. (Luuk van Baal) https://github.com/vim/vim/commit/08b0f632c125514fe0ea188c36ac048d7d7929d4
| * vim-patch:9.1.0285: Still problems with cursor position for CTRL-D/ULuuk van Baal2024-04-09
| | | | | | | | | | | | | | Problem: Problems with cursor position when scrolling half a page. Solution: Rework the cursor logic. (Luuk van Baal) https://github.com/vim/vim/commit/78c51500f1bb16501521d721d52cb0982f5e70b6
| * fix(tui): don't set cursor color when there is none (#28236)Sam2024-04-09
| |
| * vim-patch:8.2.4395: some code lines not covered by tests (#28248)zeertzjq2024-04-09
| | | | | | | | | | | | | | | | | | Problem: Some code lines not covered by tests. Solution: Add a few more test cases. Fix getting more than one error for invalid assignment. https://github.com/vim/vim/commit/8b716f5f2204f938769de283d43bcb2f77d403e7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.0981: Vim9: cannot compile "[var, var] = list" (#28247)zeertzjq2024-04-09
| | | | | | | | | | | | | | | | Problem: Vim9: cannot compile "[var, var] = list". Solution: Implement list assignment. https://github.com/vim/vim/commit/47a519a933e8bcaf703a5feaac5c01491a658ee3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.1.0277: Cannot highlight the Command-line (#28244)zeertzjq2024-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot highlight the Command-line Solution: Add the MsgArea highlighting group (Shougo Matsushita) closes: vim/vim#14327 https://github.com/vim/vim/commit/be2b03c6eecea3eae5d460e3c19ee43b73b29928 Cherry-pick Test_highlight_User() from patch 8.2.1077. Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * vim-patch:9.1.0280: several issues with 'smoothscroll' supportLuuk van Baal2024-04-09
| | | | | | | | | | | | | | | | | | | | Problem: Logic to make sure cursor is in visible part of the screen after scrolling the text with 'smoothscroll' is scattered, asymmetric and contains bugs. Solution: Adjust and create helper function for 'smoothscroll' cursor logic. (Luuk van Baal) https://github.com/vim/vim/commit/9148ba8a46baa3934c44164989cdcdec5d01d9e3
| * vim-patch:9.1.0260: Problems with "zb" and scrolling to new topline with ↵Luuk van Baal2024-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'smoothscroll' Problem: "zb" does not reveal filler lines at the start of a buffer. Scrolled cursor position with 'smoothscroll' is unpredictable, and may reset skipcol later if it is not visible (after v9.1.258) Solution: Replace confusing for loop that reaches final control value too early with while loop. Set "w_curswant" accordingly so cursor will be placed in visible part of topline. (Luuk van Baal) https://github.com/vim/vim/commit/bd28cae1f1c21c0e3743e3427c98bbd848fad237
| * vim-patch:9.1.0258: half-page scrolling broke backward compatibilityLuuk van Baal2024-04-08
| | | | | | | | | | | | | | | | | | | | | | Problem: Support for 'smoothscroll' in (half-)page scrolling broke backward compatibility and can be made to work better. (after v9.1.215) Solution: Restore the previous cursor and end-of-buffer behavior for half-page scrolling and improve 'smoothscroll' support. (Luuk van Baal) https://github.com/vim/vim/commit/cb204e688e5c9d56a78b621ef27c35d91860cb09
| * build(release.sh): regenerate docs after changing NVIM_API_PRERELEASE (#28229)zeertzjq2024-04-08
| | | | | | | | After #25574, the value of NVIM_API_PRERELEASE can affect docs, so docs need to be regenerated after changing NVIM_API_PRERELEASE.
| * build: add function add_targetdundargoc2024-04-08
| | | | | | | | | | | | | | It's a combination of add_custom_target and add_custom_command that does what most users probably expect should happen. This also fixes `make clean` removing files tracked by git.
| * vim-patch:9.1.0272: autocmd may change cwd after :tcd and :lcd (#28223)zeertzjq2024-04-08
| | | | | | | | | | | | | | | | | | Problem: Autocommand may change currect directory after :tcd and :lcd. Solution: Also clear tp_localdir and w_localdir when using aucmd_win. (zeertzjq) closes: vim/vim#14435 https://github.com/vim/vim/commit/9d956ee8eab64a0d412b045305fde5bc03d95d4a
| * vim-patch:9cd9e759ab1e (#28224)zeertzjq2024-04-08
| | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): Normalise builtin-function optional parameter formatting These should generally be formatted as func([{arg}]) and referenced as {arg} in the description. closes: vim/vim#14438 https://github.com/vim/vim/commit/9cd9e759ab1e6e6adb24a23648eed41e4d94d522 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
| * docs: don't mention executable() can return -1dundargoc2024-04-06
| | | | | | | | This cannot happen for neovim.
| * revert: "vim-patch:9.1.0055: formatting long lines is slow"zeertzjq2024-04-06
| | | | | | | | | | | | | | Revert "vim-patch:9.1.0055: formatting long lines is slow (#27199)" This reverts commit 89a9745a1a55dc9ffd0f8292735e45bae6c7b01e. Fix #28197
| * fix: adjust error message for error in UI event callback (#28200)zeertzjq2024-04-06
| | | | | | | | | | | | Also close Nvim instance before removing log file, otherwise the Nvim instance will still write to the log file. Also adjust log level in libuv_process_spawn(). Ref #27660
| * version.c: update [skip ci] (#28201)github-actions[bot]2024-04-06
| | | | | | Co-authored-by: marvim <marvim@users.noreply.github.com>
| * fix(column): ignore empty signcols range (#28177)luukvbaal2024-04-06
| | | | | | | | | | | | | | | | Problem: Invalid assert for empty signcols range. The empty range should already be removed from "b_signcols" at this point. The "clear" == kTrue call before the splice that made the range empty will have removed it, and the "clear" == kNone call after the splice already ignores the empty range. Solution: Return early when "row2" < "row1".
| * vim-patch:9.1.0267: File name entered in GUI dialog is ignoredzeertzjq2024-04-06
| | | | | | | | | | | | | | | | | | | | Problem: File name entered in GUI dialog is ignored (after v9.1.0265) Solution: Only set file name to "Untitled" if GUI dialog didn't set it. (zeertzjq) closes: vim/vim#14417 https://github.com/vim/vim/commit/c20bdf1107d48a1c14713709d12d429e761132af