aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * vim-patch:partial:5985879e3c36 (#25780)zeertzjq2023-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): Fix typos in several documents (vim/vim#13420) * Fix typos in several documents * Update runtime/doc/terminal.txt https://github.com/vim/vim/commit/5985879e3c36383155f84649fa42d06813a1893e Skip runtime/doc/indent.txt: not ported yet Co-authored-by: h_east <h.east.727@gmail.com> Co-authored-by: K.Takata <kentkt@csc.jp>
| * vim-patch:9.0.2065: EXPAND flag set for filetype option (#25779)zeertzjq2023-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: EXPAND flag set for filetype option Solution: Remove P_EXPAND flag from the 'filetype' option Remove P_EXPAND flag from the 'filetype' option Problem: P_EXPAND flag is erroneously set for 'filetype' option Solution: Remove the P_EXPAND flag This flag is used by string options that accept file path values. See :help set_env. This appears to have been included in d5e8c92 and resulted from an incorrect implementation of 'filetype' completion. See vim/vim#12900 for a small discussion. related: vim/vim#12900 closes: vim/vim#13416 https://github.com/vim/vim/commit/3932072ab435eb171ab55b2a2c0185358cd0d7bf Co-authored-by: Doug Kearns <dougkearns@gmail.com>
| * fix(terminal): assign channel to terminal earlier (#25771)zeertzjq2023-10-25
| |
| * fix(marks): handle switching buffer properly (#25763)zeertzjq2023-10-24
| |
| * build(lint): remove unnecessary clint.py rulesdundargoc2023-10-23
| | | | | | | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py.
| * fix(options): `'modified'` showing incorrect value for scratch buffersFamiu Haque2023-10-22
| | | | | | | | | | | | Problem: #25716 removed the logic for getting the correct value of the `'modified'` option when using `nvim_buf_get_option()`. So the function now returns an incorrect value of `'modified'` for scratch buffers. Solution: Re-add the logic for getting the correct value of `'modified'`. Also make it so that the logic only exists in one place instead of being duplicated across multiple places in the code.
| * feat(complete): support f flag for complete buffer partglepnir2023-10-21
| |
| * vim-patch:9.0.2059: outstanding exceptions may be skipped (#25736)zeertzjq2023-10-21
| | | | | | | | | | | | | | | | | | | | | | Problem: outstanding exceptions may be skipped Solution: When restoring exception state, process remaining outstanding exceptions closes: vim/vim#13386 https://github.com/vim/vim/commit/0ab500dede4edd8d5aee7ddc63444537be527871 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * feat(lsp): add snippet API (#25301)Maria José Solano2023-10-21
| |
| * fix(event-loop): flush UI when no input is available (#25728)zeertzjq2023-10-20
| | | | | | | | | | | | Problem: With lots of events, UI flush may be delayed for too long. Solution: Flush UI when no input is available. This still flushes less frequently than before #25629, when a flush also happens when typeahead buffer is empty but input is available.
| * refactor(options): `get_option_value_strict()` and `SREQ_*`Famiu Haque2023-10-20
| | | | | | | | `SREQ_*` values are now actual typedef'd enums. `get_option_value_strict()` has also been refactored and split into two functions, `get_option_attrs()` for getting the option attributes, and `get_option_value_strict()` for getting the actual value. Moreover, it now returns an `OptVal`. Other miscellaneous refactors have also been made.
| * vim-patch:9.0.2056: no digraph for quadruple primeChristian Clason2023-10-20
| | | | | | | | | | | | | | | | | | | | | | Problem: no digraph for quadruple prime Solution: add quadruple prime digraph using 4' closes: vim/vim#13380 https://github.com/vim/vim/commit/47416d1a7441f8c815438903e78ba0a2d877699e Co-authored-by: Jonathan Wright <quaggy@gmail.com>
| * vim-patch:9.0.2050: Vim9: crash with deferred function call and exception ↵zeertzjq2023-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25715) Problem: Vim9: crash with deferred function call and exception Solution: Save and restore exception state Crash when a deferred function is called after an exception and another exception is thrown closes: vim/vim#13376 closes: vim/vim#13377 https://github.com/vim/vim/commit/c59c1e0d88651a71ece7366e418f1253abbe2a28 The change in check_due_timer() is N/A as Nvim calls timer callbacks on the main loop. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.0.2044: Vim9: exceptions confuse defered functionszeertzjq2023-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: exceptions confuse defered functions Solution: save and restore exception state when calling defered functions closes: vim/vim#13364 closes: vim/vim#13372 https://github.com/vim/vim/commit/0672595fd50e9ae668676a40e28ebf66d7f52392 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * build: add sub-targets to the doc targetdundargoc2023-10-18
| | | | | | | | | | It's easier to debug and to customize scripting if there are sub-targets that build up each target.
| * fix(move): check the correct buffer (#25698)zeertzjq2023-10-18
| |
| * vim-patch:9.0.2041: trim(): hard to use default mask (#25692)zeertzjq2023-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: trim(): hard to use default mask (partly revert v9.0.2040) Solution: use default mask when it is empty The default 'mask' value is pretty complex, as it includes many characters. Yet, if one needs to specify the trimming direction, the third argument, 'trim()' currently requires the 'mask' value to be provided explicitly. Currently, an empty 'mask' will make 'trim()' call return 'text' value that is passed in unmodified. It is unlikely that someone is using it, so the chances of scripts being broken by this change are low. Also, this reverts commit 9.0.2040 (which uses v:none for the default and requires to use an empty string instead). closes: vim/vim#13358 https://github.com/vim/vim/commit/8079917447e7436dccc2e4cd4a4a56ae0a4712f2 vim-patch:9.0.2040: trim(): hard to use default mask Problem: trim(): hard to use default mask Solution: Use default 'mask' when it is v:none The default 'mask' value is pretty complex, as it includes many characters. Yet, if one needs to specify the trimming direction, the third argument, 'trim()' currently requires the 'mask' value to be provided explicitly. 'v:none' is already used to mean "use the default argument value" in user defined functions. See |none-function_argument| in help. closes: vim/vim#13363 https://github.com/vim/vim/commit/6e6386716f9494ae86027c6d34f657fd03dfec42 Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
| * vim-patch:9.0.2035: [security] use-after-free with wildmenu (#25687)zeertzjq2023-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security] use-after-free with wildmenu Solution: properly clean up the wildmenu when exiting Fix wildchar/wildmenu/pum memory corruption with special wildchar's Currently, using `wildchar=<Esc>` or `wildchar=<C-\>` can lead to a memory corruption if using wildmenu+pum, or wrong states if only using wildmenu. This is due to the code only using one single place inside the cmdline process loop to perform wild menu clean up (by checking `end_wildmenu`) but there are other odd situations where the loop could have exited and we need a post-loop clean up just to be sure. If the clean up was not done you would have a stale popup menu referring to invalid memory, or if not using popup menu, incorrect status line (if `laststatus=0`). For example, if you hit `<Esc>` two times when it's wildchar, there's a hard-coded behavior to exit command-line as a failsafe for user, and if you hit `<C-\><C-\><C-N>` it will also exit command-line, but the clean up code would not have hit because of specialized `<C-\>` handling. Fix Ctrl-E / Ctrl-Y to not cancel/accept wildmenu if they are also used for 'wildchar'/'wildcharm'. Currently they don't behave properly, and also have potentially memory unsafe behavior as the logic is currently not accounting for this situation and try to do both. (Previous patch that addressed this: vim/vim#11677) Also, correctly document Escape key behavior (double-hit it to escape) in wildchar docs as it's previously undocumented. In addition, block known invalid chars to be set in `wildchar` option, such as Ctrl-C and `<CR>`. This is just to make it clear to the user they shouldn't be set, and is not required for this bug fix. closes: vim/vim#13361 https://github.com/vim/vim/commit/8f4fb007e4d472b09ff6bed9ffa485e0c3093699 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
| * vim-patch:9.0.2037: A few remaining cmdline completion issues with C-E/Y ↵zeertzjq2023-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25686) Problem: A few remaining cmdline completion issues with C-E/Y Solution: Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end A few places in the cmdline completion code only works properly when the user hits Tab (or 'wildchar') at the end of the cmdline, even though it's supposed to work even in the middle of the line. For fuzzy search, `:e ++ff`, and `:set hl=`, fix completion code to make sure to use `xp_pattern_len` instead of assuming the entire `xp_pattern` is the search pattern (since it contains texts after the cursor). Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a wildmenu completion. Also, make them work even when not using `set wildoptions+=pum` as there is no drawback to doing so. (Related issue where this was brought up: vim/vim#13331) closes: vim/vim#13362 https://github.com/vim/vim/commit/209ec90b9b9bd948d76511c9cd2b17f47a97afe6 Cherry-pick ex_getln.c changes from patch 9.0.2035. Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
| * vim-patch:9.0.2039: completion shows current word after completion restart ↵zeertzjq2023-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25682) Problem: completion shows current word after completion restart Solution: remove the word being completed after completion restart The word being completed is shown in a completion list after completion restart, because it isn't removed from the current buffer before searching for matches. Also adjust `Test_complete_add_onechar` to match the new behavior. closes: vim/vim#13349 https://github.com/vim/vim/commit/2e3cd52fa02b1a208c97992b1bca3b04f7be66d4 Co-authored-by: nwounkn <nwounkn@gmail.com>
| * refactor(options): make `did_set_shada` a normal option callbackFamiu Haque2023-10-17
| |
| * refactor(options): make `os_oldval` and `os_newval` use `OptValData`Famiu Haque2023-10-17
| |
| * refactor(options): rename `empty_option` to `empty_string_option`Famiu Haque2023-10-17
| |
| * refactor(options): deduplicate the `do_set_option` codepathFamiu Haque2023-10-17
| |
| * refactor(options): deduplicate `do_set_option_string`Famiu Haque2023-10-17
| | | | | | | | Reduce code duplication between `do_set_option_string` and `set_string_option` by making the former call the latter within itself.
| * refactor(options): remove `os_op`Famiu Haque2023-10-17
| |
| * refactor(options)!: make OptionSet `v:` values use typvalFamiu Haque2023-10-17
| | | | | | | | BREAKING CHANGE: This breaks the OptionSet autocommand, as the `v:` values associated with it (`v:option_new`, `v:option_old`, `v:option_oldlocal` and `v:option_oldglobal`) are now the same type as the option, instead of all option values being converted to strings.
| * refactor(options): unify set_num_option and set_bool_optionFamiu Haque2023-10-17
| |
| * vim-patch:9.0.2033: gcc overflow-warning for f_resolve (#25666)zeertzjq2023-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: gcc overflow-warning for f_resolve Solution: use pointer p instead of pointer q[-1] Suppress the following warning: ``` filepath.c: In function ‘f_resolve’: filepath.c:2162:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 2162 | q[-1] = NUL; ``` Closes: vim/vim#13352 closes: vim/vim#13353 https://github.com/vim/vim/commit/215c3261a25f7a99e8711a3b3c6158119c6aea9e Co-authored-by: Ken Takata <kentkt@csc.jp>
| * vim-patch:dbf749bd5aae (#25665)zeertzjq2023-10-16
| | | | | | | | | | | | | | | | | | | | | | runtime: Fix more typos (vim/vim#13354) * Fix more typos * Fix typos in ignored runtime/ directory https://github.com/vim/vim/commit/dbf749bd5aaef6ea2d28bce081349785d174d96a Co-authored-by: Viktor Szépe <viktor@szepe.net>
| * refactor(lang): reduce scope of HAVE_WORKING_LIBINTL #ifdefsbfredl2023-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of code inside HAVE_WORKING_LIBINTL doesn't really depend on a "working libintl". For instance ex_language is also used for ":lang collate" and ":lang time". Also ":lang C" should not fail just because translations aren't available (it just means use the default text). References: https://github.com/neovim/neovim/pull/1 2d00ead2e57653b771354a564f9a760c2ce0d18e separate ifdefs for locale and gettext got merged together. https://github.com/neovim/neovim/commit/8253e29971c54310434ee93d987a99994769d717 Unmotivated switcharoo of get_mess_env() logic. If available, get_locale_val(LC_MESSAGES) is the correct implementation.
| * fix(extmarks): skip virt_text if it is out of window (#25658)zeertzjq2023-10-15
| |
| * vim-patch:9.0.2025: no cmdline completion for ++opt args (#25657)zeertzjq2023-10-15
| | | | | | | | | | | | | | | | | | | | | | Problem: no cmdline completion for ++opt args Solution: Add cmdline completion for :e ++opt=arg and :terminal [++options] closes: vim/vim#13319 https://github.com/vim/vim/commit/989426be6e9ae23d2413943890206cbe15d9df38 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
| * vim-patch:9.0.2032: cannot get mouse click pos for tab or virt text (#25653)zeertzjq2023-10-15
| | | | | | | | | | | | | | | | | | Problem: Cannot accurately get mouse clicking position when clicking on a TAB or with virtual text. Solution: Add a "coladd" field to getmousepos() result. closes: vim/vim#13335 https://github.com/vim/vim/commit/f5a94d5165bb9e390797da50a1fa7a87df3fbee4
| * vim-patch:9.0.2031: TextChangedI may be triggered by non-insert mode change ↵zeertzjq2023-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25656) Problem: `TextChangedI` can trigger on entering Insert mode if there was previously a change not in Insert mode. Solution: Make it trigger only when text is actually changed in Insert mode. closes: vim/vim#13265 closes: vim/vim#13338 https://github.com/vim/vim/commit/d7ae263af8f6a2da55ce3702d18c53ab1418bca7 Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
| * vim-patch:9.0.2030: no max callback recursion limit (#25655)zeertzjq2023-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: no max callback recursion limit Solution: bail out, if max call recursion for callback functions has been reached. This checks the 'maxfuncdepth' setting and throws E169 when a callback function recursively calls itself. closes: vim/vim#13337 closes: vim/vim#13339 https://github.com/vim/vim/commit/47510f3d6598a1218958c03ed11337a43b73f48d Co-authored-by: Christian Brabandt <cb@256bit.org>
| * docs: restore accidentally removed line in :h 'ignorecase' (#25651)zeertzjq2023-10-15
| |
| * vim-patch:2bbd0d30eebd (#25637)zeertzjq2023-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): Improve command-line completion docs (vim/vim#13331) * Improve command-line completion docs Add more details about 'ignorecase' and its effect on cmdline completion. Make sure keys used in wildmenu are properly documented and linked in the keys' documentation entries, and in `:h index` for proper cross-referencing, as wildmenu popup is slightly different from insert-mode popup menu. * Fix docs typos https://github.com/vim/vim/commit/2bbd0d30eebdea66c0da3895e83d999ed6ad83fb Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
| * vim-patch:9.0.2022: getmousepos() returns wrong index for TAB char (#25636)zeertzjq2023-10-14
| | | | | | | | | | | | | | | | | | | | | | Problem: When clicking in the middle of a TAB, getmousepos() returns the column of the next char instead of the TAB. Solution: Break out of the loop when the vcol to find is inside current char. Fix invalid memory access when calling virtcol2col() on an empty line. closes: vim/vim#13321 https://github.com/vim/vim/commit/b583eda7031b1f6a3469a2537d0c10ca5fa5568e
| * vim-patch:9.0.2021: Coverity complains about change in charset (#25634)zeertzjq2023-10-14
| | | | | | | | | | | | | | | | | | | | Problem: Coverity complains about change in charset (after v9.0.2017) Solution: check pointer t at index 0 closes: vim/vim#13322 https://github.com/vim/vim/commit/cd6ee6935811ab223605a3f39a550d26a617867d Co-authored-by: Christian Brabandt <cb@256bit.org>
| * fix(ui): empty line before the next message after :silent commandnwounkn2023-10-14
| | | | | | | | | | | | | | | | | | | | Problem: The next command after `silent !{cmd}` or `silent lua print('str')` prints an empty line before printing a message, because these commands set `msg_didout = true` despite not printing any messages. Solution: Set `msg_didout = true` only if `msg_silent == 0`
| * vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629)zeertzjq2023-10-14
| | | | | | | | | | | | | | Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
| * fix(grid): add start column when getting char on line (#25627)zeertzjq2023-10-13
| |
| * fix: allow multiline message for echoerr (#25380)Jongwook Choi2023-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: Currently `:echoerr` prints multi-line strings in a single line as `:echom` does (Note: `:echon` can print multi-line strings well). This makes stacktrace printed via echoerr difficult to read. Example code: try lua error("lua stacktrace") catch echoerr v:exception endtry Output: Error detected while processing a.vim[5]..a.vim: line 4: Vim(lua):E5108: Error executing lua [string ":lua"]:1: lua stacktrace^@stack traceback:^@^I[C]: in function 'error'^@^I[string ":lua"]:1: in main chunk SOLUTION: Allow echoerr to print multiline messages (e.g., lua exceptions), because this command is usually used to print stacktraces. Output after the fix: Error detected while processing a.vim[5]..a.vim: line 4: Vim(lua):E5108: Error executing lua [string ":lua"]:1: lua stacktrace stack traceback: [C]: in function 'error' [string ":lua"]:1: in main chunk
| * vim-patch:9.0.2018: complete_info() returns wrong index (#25607)zeertzjq2023-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: complete_info() returns wrong index Solution: Make order of 'info' in completion_info consistent Start the iteration from the same point and follow the same direction as done when assigning the completion numbers. This way we remove the dependence on the completion direction and make the order of 'info' consistent. closes: vim/vim#12230 closes: vim/vim#12971 https://github.com/vim/vim/commit/69fb5afb3bc9da24c2fb0eafb0027ba9c6502fc2 Co-authored-by: LemonBoy <thatlemon@gmail.com>
| * vim-patch:8.2.3064: Vim9: in script cannot set item in uninitialized list ↵zeertzjq2023-10-12
| | | | | | | | | | | | | | | | | | | | (#25605) Problem: Vim9: in script cannot set item in uninitialized list. Solution: When a list is NULL allocate an empty one. (closes vim/vim#8461) https://github.com/vim/vim/commit/e65081d1b591f16dc6e380a830d87565c5eb7b03 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.2017: linebreak applies for leading whitespacezeertzjq2023-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: vim/vim#13228 closes: vim/vim#13243 https://github.com/vim/vim/commit/dd75fcfbdff1934c6e531b5a89ebc636318bf4a2 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * refactor(float): rename ex_floatclose to ex_fclose (#25596)Raphael2023-10-11
| |
| * docs: small fixesdundargoc2023-10-10
| | | | | | | | | | | | Co-authored-by: Wansmer <wansmer@gmail.com> Co-authored-by: Andrew Voynov <andrewvoynov.b@gmail.com> Co-authored-by: David Moberg <david.moberg@mediatek.com>
| * Merge pull request #25561 from glepnir/9663bfredl2023-10-10
| |\ | | | | | | feat(float): add fclose command