aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | vim-patch:9.0.0883: a silent mapping may cause dots on the command line (#21061)zeertzjq2022-11-15
| | | | | | | | | | | | | | | | | | Problem: A silent mapping may cause dots on the command line. Solution: Don't show dots for completion if they are not going to be removed again. (closes vim/vim#11501) https://github.com/vim/vim/commit/698a00f55d60043d51b1c98cbbf3f9fd10badd2f Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | Merge pull request #21054 from max397574/fix/deepcopy_vimNILbfredl2022-11-14
|\ \ | |/ |/| fix(lua): make `vim.deepcopy` work with `vim.NIL`
| * fix(lua): make `vim.deepcopy` work with `vim.NIL`Max2022-11-14
|/ | | | | | | | style: changed double quotes to single quotes feat: add tests fix tests
* feat(lua-api): avoid unnecessary allocations (#19877)Lewis Russell2022-11-14
| | | | Lua makes (or reuses) an internal copy of strings, so we can safely push buf pointers onto the stack.
* vim-patch:9.0.0878: Coverity warns for dead code (#21053)zeertzjq2022-11-14
| | | | | | | | | | Problem: Coverity warns for dead code. Solution: Remove the dead code. https://github.com/vim/vim/commit/b298fe6cbae3b240b10dbd55d9c38d0cc8e033d3 Nvim has refactored this function and does not have the dead code. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(test): add Lua forms for API methods (#20152)Lewis Russell2022-11-14
|
* test: remove skip for 32-bit MSVC (#21030)dundargoc2022-11-14
| | | We don't support 32-bit windows anymore so it's not needed.
* vim-patch:8.2.4038: various code not used when features are disabled (#21049)zeertzjq2022-11-14
| | | | | | | | | | | | | | | Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes vim/vim#9491) https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d N/A patches for version.c: vim-patch:8.2.2186: Vim9: error when using 'opfunc' Problem: Vim9: error when using 'opfunc'. Solution: Do not expect a return value from 'opfunc'. (closes vim/vim#7510) https://github.com/vim/vim/commit/5b3d1bb0f5180266c4de4d815b3ea856a2fb3519
* vim-patch:8.2.4001: insert complete code uses global variableszeertzjq2022-11-14
| | | | | | | | | Problem: Insert complete code uses global variables. Solution: Make variables local to the file and use accessor functions. (Yegappan Lakshmanan, closes vim/vim#9470) https://github.com/vim/vim/commit/d94fbfc74a8b8073e7a256c95fa6f39fc527c726 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* test(old): add missing lines from Vim patch 8.2.0522 (#21048)zeertzjq2022-11-14
|
* vim-patch:9.0.0872: code is indented more than needed (#21046)zeertzjq2022-11-14
| | | | | | | | | | Problem: Code is indented more than needed. Solution: Return early. (Yegappan Lakshmanan, closes vim/vim#11538) https://github.com/vim/vim/commit/623e94e13810e109c6aa201bcf3a8278429502f3 Only port the first change to init_history() as Nvim has refactored it. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* test: introduce skip() #21010dundargoc2022-11-13
| | | | | | | This is essentially a convenience wrapper around the `pending()` function, similar to `skip_fragile()` but more general-purpose. Also remove `pending_win32` function as it can be replaced by `skip(iswin())`.
* Merge pull request #21033 from bfredl/winfixbfredl2022-11-13
|\ | | | | fix(ui): fix some cases of stale highlight definitions
| * fix(ui): fix some cases of stale highlight definitionsbfredl2022-11-13
| | | | | | | | fixes #20695
* | Merge pull request #20984 from notomo/fix-message-kind-on-historybfredl2022-11-13
|\ \ | | | | | | fix(ui-ext): correct message kind in history before vim.ui_attach()
| * | fix(ui-ext): correct message kind in history before vim.ui_attach()notomo2022-11-07
| | |
* | | vim-patch:9.0.0865: duplicate arguments are not always detected (#21036)zeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Duplicate arguments are not always detected. Solution: Expand to full path before comparing arguments. (Nir Lichtman, closes vim/vim#11505, closes vim/vim#9402) https://github.com/vim/vim/commit/b3052aa1b555ab5a81b1459a4972290381b0e7e4 Co-authored-by: Nir Lichtman <nir@lichtman.org>
* | | vim-patch:9.0.0863: col() and charcol() only work for the current window ↵zeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#21038) Problem: col() and charcol() only work for the current window. Solution: Add an optional winid argument. (Yegappan Lakshmanan, closes vim/vim#11466, closes vim/vim#11461) https://github.com/vim/vim/commit/4c8d2f02b3ce037bbe1d5ee12887e343c6bde88f Cherry-pick test_functions.vim change from patch 8.2.0633. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | | vim-patch:9.0.0867: wildmenu redrawing code is spread out (#21035)zeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Wildmenu redrawing code is spread out. Solution: Refactor to move code together. (closes vim/vim#11528) https://github.com/vim/vim/commit/d6e91385f0f7256aec8f70373c9e3399770d22e5 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | | test(lua/ui_spec): fix Ctrl-C test flakiness (#21039)zeertzjq2022-11-13
| | | | | | | | | Prevent Ctrl-C from flushing the command that starts the prompt.
* | | Merge pull request #21037 from zeertzjq/vim-8.2.4675zeertzjq2022-11-13
|\ \ \ | | | | | | | | vim-patch:8.2.{4675,4676},9.0.0869: no error for missing expression after :elseif
| * | | vim-patch:9.0.0869: bogus error when string used after :elseifzeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Bogus error when string used after :elseif. Solution: Do not consider a double quote the start of a comment. (closes vim/vim#11534) https://github.com/vim/vim/commit/28c56d501352bd98472d23667bade683877cadcc Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | vim-patch:8.2.4676: test fails with different errorzeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Test fails with different error. Solution: Add argument for :elseif. https://github.com/vim/vim/commit/292e1b9f681054a1de8fa22315ae6eedd7acb205 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | vim-patch:8.2.4675: no error for missing expression after :elseifzeertzjq2022-11-13
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Problem: No error for missing expression after :elseif. (Ernie Rael) Solution: Check for missing expression. (closes vim/vim#10068) https://github.com/vim/vim/commit/fa010cdfb115fd2f6bae7ea6f6e63be906b5e347 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | | vim-patch:9.0.0866: no test for what patch 8.2.2207 fixes (#21034)zeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | Problem: No test for what patch 8.2.2207 fixes. Solution: Add a test case. (closes vim/vim#11531) https://github.com/vim/vim/commit/f7570f2107d91f35dc67dd0e400fc638585b226c
* | | vim-patch:9.0.0862: default value of 'endoffile' is wrong (#21032)zeertzjq2022-11-12
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Default value of 'endoffile' is wrong. Solution: The default must be 'noendoffile'. https://github.com/vim/vim/commit/0aad88f073602849d1623122eb3c323f8e252def Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | | fix: vim.ui.input always calls callback #21006Steven Arcangeli2022-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to #20883 Related: #18144 This patch changes the behavior of the default `vim.ui.input` when the user aborts with `<C-c>`. Currently, it produces an error message + stack and causes `on_confirm` to not be called. With this patch, `<C-c>` will cause `on_confirm` to be called with `nil`, the same behavior as when the user aborts with `<Esc>`. I can think of three good reasons why the behavior should be this way: 1. Easier for the user to understand** It's not intuitive for there to be two ways to abort an input dialog that have _different_ outcomes. As a user, I would expect any action that cancels the input to leave me in the same state. As a plugin author, I see no value in having two possible outcomes for aborting the input. I have to handle both cases, but I can't think of a situation where I would want to treat one differently than the other. 2. Provides an API that can be overridden by other implementations** The current contract of "throw an error upon `<C-c>`" cannot be replicated by async implementations of `vim.ui.input`. If the callsite wants to handle the case of the user hitting `<C-c>` they need to use `pcall(vim.ui.input, ...)`, however an async implementation will instantly return and so there will be no way for it to produce the same error-throwing behavior when the user inputs `<C-c>`. This makes it impossible to be fully API-compatible with the built-in `vim.ui.input`. 3. Provides a useful guarantee to the callsite** As a plugin author, I want the guarantee that `on_confirm` will _always_ be called (only catastrophic errors should prevent this). If I am in the middle of some async thread of logic, I need some way to resume that logic after handing off control to `vim.ui.input`. The only way to handle the `<C-c>` case is with `pcall`, which as already mentioned, breaks down if you're using an alternative implementation.
* | | Merge pull request #20178 from vigoux/extmark-nospellLewis Russell2022-11-12
|\ \ \ | |_|/ |/| | feat(extmarks): allow preventing spellchecking with spell = false
| * | feat(spell): support nospell in treesitter queriesLewis Russell2022-11-12
| | |
| * | feat(extmarks): allow preventing spellchecking with spell = falseThomas Vigouroux2022-11-12
|/ /
* | vim-patch:9.0.0845: shell command with just space gives strange error (#21029)zeertzjq2022-11-12
| | | | | | | | | | | | | | | | | | Problem: Shell command with just space gives strange error. Solution: Skip white space at start of the argument. (Christian Brabandt, Shane-XB-Qian, closes vim/vim#11515, closes vim/vim#11495) https://github.com/vim/vim/commit/4e7590ec00483077daaa567aa2220bc8df912f3c Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
* | feat(checkhealth): use "help" syntax, avoid tabpage #20879Justin M. Keyes2022-11-11
| | | | | | | | | | | | | | | | | | - If Nvim was just started, don't create a new tab. - Name the buffer "health://". - Use "help" syntax instead of "markdown". It fits better, and eliminates various workarounds. - Simplfy formatting, avoid visual noise. - Don't print a "INFO" status, it is noisy. - Drop the ":" after statuses, they are already UPPERCASE and highlighted.
* | vim-patch:8.2.2207: illegal memory access if popup menu items are changed ↵zeertzjq2022-11-12
| | | | | | | | | | | | | | | | | | | | | | (#21028) Problem: Illegal memory access if popup menu items are changed while the menu is visible. (Tomáš Janoušek) Solution: Make a copy of the text. (closes vim/vim#7537) https://github.com/vim/vim/commit/38455a921395a56690790c8c1d28c1c43ca04c8a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.0861: solution for "!!sort" in closed fold is not optimal (#21027)zeertzjq2022-11-12
| | | | | | | | | | | | | | | | | | Problem: Solution for "!!sort" in closed fold is not optimal. Solution: Use a different range instead of the subtle difference in handling a range with an offset. (issue vim/vim#11487) https://github.com/vim/vim/commit/9954dc39ea090cee6bf41c888c41e60d9f52c3b8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.0715: wrong argument for append() gives two error messages ↵zeertzjq2022-11-11
| | | | | | | | | | | | | | | | | | | | | | (#21023) Problem: Wrong argument for append() gives two error messages. Solution: When getting an error for a number argument don't try using it as a string. (closes vim/vim#11335) https://github.com/vim/vim/commit/801cd35e7e3b21e519e12a1610ee1d721e40893e Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:8.2.1919: assert_fails() setting emsg_silent changes normal ↵zeertzjq2022-11-11
| | | | | | | | | | | | | | | | | | | | | | | | execution (#20998) Problem: Assert_fails() setting emsg_silent changes normal execution. Solution: Use a separate flag in_assert_fails. https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4 Cherry-pick no_wait_return from patch 9.0.0846. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | fix(messages): don't set cmdline_row when messages have scrolled (#21015)zeertzjq2022-11-11
| | | | | | | | | | When 'cmdheight' is changed while messages have scrolled, the position of msg_grid is not moved up, so cmdline_row should not be set based on the position of msg_grid.
* | vim-patch:9.0.0858: "!!sort" in a closed fold sorts too many lines (#21022)zeertzjq2022-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "!!sort" in a closed fold sorts too many lines. Solution: Round to end of fold after adding the line count. (closes vim/vim#11487) https://github.com/vim/vim/commit/f00112d558eb9a7d1d5413c096960ddcc52c9f66 N/A patches for version.c: vim-patch:9.0.0855: comment not located above the code it refers to Problem: Comment not located above the code it refers to. Solution: Move the comment. (closes vim/vim#11527) https://github.com/vim/vim/commit/09a93e3e66689c691a00fce25e4ce310d81edaee vim-patch:9.0.0859: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Add #ifdef. https://github.com/vim/vim/commit/fd3084b6e298477dec4979515c6b4a8a3c3beeb2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | refactor: move tabline code to statusline.c (#21008)luukvbaal2022-11-10
| | | | | | | | | | | | | | | | * refactor: move tabline code to statusline.c Problem: Tabline code is closely related to statusline, but still left over in drawscreen.c and screen.c. Solution: Move it to statusline.c. * refactor: add statusline_defs.h
* | vim-patch:76db9e076318 (#21013)Sean Dewar2022-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/76db9e076318cb0ae846f43b7549ad4f2d234c0b - `col()`'s example was changed to use `:echowin` so that the message can be seen with `showmode`. Use "\n" to force a hit-enter instead as `:echowin` isn't ported. - Replace interpolated string usage in syntax/modula3.vim (not ported). - Add a space after the `wincmd =` examples in `*CTRL-W_=*` so that the inlined code is highlighted properly when followed by a full stop. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | docs(treesitter): fix predicate syntax (#21016)James Trew2022-11-10
| |
* | revert: "oldtests: win: fix buffer pathsep" (#21017)zeertzjq2022-11-10
| | | | | | | | | | This reverts commit 40e894f59570a6192aabbe4fe34c456bd00ae871. No longer needed after #10679
* | fix(man.lua): use `env` command (#21007)euclidianAce2022-11-09
| | | | | | | | | | | | | | Previously man.lua would use the `env` field in the parameters of `vim.loop.spawn` to override things like MANPAGER. This caused issues on NixOS since `spawn` will _override_ the environment rather than _append_ to it (and NixOS relies on a heavily modified environment). Using the `env` command to append to the environment solves this issue.
* | fix(clipboard): update version regex pattern (#21012)Gregory Anders2022-11-09
| | | | | | | | Building tmux from source uses a 'next-' prefix, so account for that. Also handle failures to match more gracefully.
* | docs: swap CursorLineFold and CursorLineSign (#20875)Eduard Baturin2022-11-10
| |
* | fix(messages): reset msg_grid_scroll_discount when redrawing (#21000)zeertzjq2022-11-10
| |
* | Merge pull request #20821 from dundargoc/refactor/clang-tidybfredl2022-11-08
|\ \ | | | | | | refactor: fix clang-tidy warnings
| * | refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | | | | | | | | | | | | | | | | | Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.
* | | refactor: remove stray emsg check after #20992 (#20996)luukvbaal2022-11-08
| | |
* | | fix(vim.ui.input): return empty string when inputs nothing (#20883)Jongwook Choi2022-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix(vim.ui.input): return empty string when inputs nothing The previous behavior of `vim.ui.input()` when typing <CR> with no text input (with an intention of having the empty string as input) was to execute `on_confirm(nil)`, conflicting with its documentation. Inputting an empty string should now correctly execute `on_confirm('')`. This should be clearly distinguished from cancelling or aborting the input UI, in which case `on_confirm(nil)` is executed as before.