aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* fix(lsp): when renaming directory, check path prefix of buffer names (#27603)Jaehwang Jung2024-02-24
| | | | | For example, when renaming /path/to/dir, buffers like fern://drawer/file:///path/to/dir, /path/to/dir123 should not be matched.
* vim-patch:9.1.0131: buffer-completion may not always find all matches (#27610)zeertzjq2024-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: buffer-completion code too complicated and does not always find all matches (irisjae) Solution: do not try to anchor pattern to beginning of line or directory-separator, always return all matches Note: we are considering the non-fuzzy buffer-matching here. Currently, the buffer-completion code makes 2 attempts to match a pattern against the list of available patterns. First try is to match the pattern and anchor it to either the beginning of the file name or at a directory-separator (// or \\). When a match is found, Vim returns the matching buffers and does not try to find a match anywhere within a buffer name. So if you have opened two buffers like /tmp/Foobar.c and /tmp/MyFoobar.c using `:b Foo` will only complete to the first filename, but not the second (the same happens with `getcompletion('Foo', 'buffer')`). It may make sense, that completion priorities buffer names at directory boundaries, but it inconsistent, may cause confusion why a certain buffer name is not completed when typing `:b Foo<C-D>` which returns only a single file name and then pressing Enter (to switch to that buffer), Vim will error with 'E93: More than one match for Foo'). Similar things may happen when wiping the /tmp/Foobar.c pattern and afterwards the completion starts completing other buffers. So let's simplify the code and always match the pattern anywhere in the buffer name, do not try to favor matches at directory boundaries. This is also simplifies the code a bit, we do not need to run over the list of buffers several times, but only twice. fixes vim/vim#13894 closes: vim/vim#14082 https://github.com/vim/vim/commit/0dc0bff000fd804c6b0778ccc4554a4e4c82c8c9 Cherry-pick test_cmdline.vim from patch 9.1.0019 as it already passes. Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.0132: "C" doesn't include composing chars with 'virtualedit' ↵zeertzjq2024-02-24
| | | | | | | | | | | | | (#27605) Problem: using "C" and 've=all' set, doesn't include composing chars when changing a line, keeps the composing chars for whatever is typed afterwards. Solution: Use mb_head_off() and mb_ptr2len() instead of mb_tail_off(). (zeertzjq) closes: vim/vim#14083 https://github.com/vim/vim/commit/048761bcd40ec630fd3e039f0066cf4e484ceabd
* fix(terminal): block input when there is pending TermRequest (#27589)zeertzjq2024-02-24
|
* Merge pull request #27590 from bfredl/signcolfixbfredl2024-02-23
|\ | | | | fix(marktree): do not count certain marks twice when checking for overlap
| * fix(marktree): some marks counted twice when checking for overlapbfredl2024-02-23
| | | | | | | | fixes #27046
* | vim-patch:9.1.0126: Internal error when using upper-case mark in getregion()zeertzjq2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Internal error when passing mark in another buffer to getregion(). Solution: Don't allow marks in another buffer (zeertzjq) closes: vim/vim#14076 Internal error when passing mark in another buffer to getregion() https://github.com/vim/vim/commit/421b597470c118871c7081de00dd065e0e000b7e
* | vim-patch:9.1.0120: hard to get visual region using Vim scriptzeertzjq2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: hard to get visual region using Vim script Solution: Add getregion() Vim script function (Shougo Matsushita, Jakub Łuczyński) closes: vim/vim#13998 closes: vim/vim#11579 https://github.com/vim/vim/commit/3f905ab3c4f66562f4a224bf00f49d98a0b0da91 Cherry-pick changes from patch 9.1.0122, with :echom instead of :echow. Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
* | fix(defaults): make terminal autoclose not block other events (#27581)Evgeni Chasnovski2024-02-22
|/ | | | | | Problem: When terminal is autocloses, it blocks other events, like `BufEnter`. Solution: Use `nested = true`.
* fix(lua): make highlight.on_yank use win-local highlight (#27349)altermo2024-02-22
| | | | | | | | Currently, highlight.on_yank() does buffer-local highlighting, this PR makes it window scoped. Also fix the problem that when yanking in a buffer, moving to another buffer, and yanking before the original buffer highlight disappears, the original buffer highlight won't disappear on timeout.
* fix(api): don't leak memory with nvim_win_get_ns (#27570)zeertzjq2024-02-22
|
* fix(extmarks): redraw properly with scoped inline virt_text (#27569)zeertzjq2024-02-22
|
* test(treesitter): fix obsolete predicatesChristian Clason2024-02-21
|
* feat(extmark): window scoped extmarkaltermo2024-02-21
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:ef387c062bb1 (#27553)zeertzjq2024-02-21
| | | | | | | | | | | | | | runtime(filetype): Modula-2 files with priority not detected (vim/vim#14055) Problem: Modula-2 files with a specified priority are not detected. Solution: Match the priority syntax in module header lines when performing heuristic content detection. Disable the :defcompile debug line. This was accidentally left enabled in commit 68a8947. https://github.com/vim/vim/commit/ef387c062bb1966187d3f307d697d80162051a0d Co-authored-by: dkearns <dougkearns@gmail.com>
* fix(vim.ui.open): use explorer.exe instead of wslview #26947Vu Nhat Chuong2024-02-20
| | | | | | | | | Problem: `vim.ui.open` uses `wslview`, which is slow and require a package from external PPA: https://wslutiliti.es/wslu/install.html#ubuntu Solution: Use `explorer.exe` instead. WSL supports it by default: https://learn.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer
* fix(extmarks): priority order of inline and non-inline virt_text (#27532)zeertzjq2024-02-20
|
* feat(tabline): middle mouse button now closes tab (#27522)Nacho Nieva2024-02-19
|
* vim-patch:9.1.0115: Using freed memory with full tag stack and user data ↵zeertzjq2024-02-19
| | | | | | | | | | | | | | | | | (#27525) Problem: Using freed memory with full tag stack and user data (Konstantin Khlebnikov) Solution: Clear the user data pointer of the newest entry. (zeertzjq, Konstantin Khlebnikov) fixes: neovim/neovim#27498 closes: vim/vim#14053 https://github.com/vim/vim/commit/c86bff1771ed9c340f8f4433ae5530fd6de97980 Cherry-pick Test_tag_stack() changes from patch 9.0.0767. Co-authored-by: Konstantin Khlebnikov <koct9i@gmail.com>
* fix(eval): skip over v:lua properly (#27517)zeertzjq2024-02-18
| | | | Problem: Error when parsing v:lua in a ternary expression. Solution: Set rettv->v_type for v:lua even if not evaluating.
* fix(options): don't update curswant for 'winhl' or 'winbl' (#27515)zeertzjq2024-02-18
|
* vim-patch:9.1.0114: Setting some options may change curswant (#27514)zeertzjq2024-02-18
| | | | | | | | | Problem: Setting some options changes curswant unnecessarily. Solution: Add a P_HLONLY flag that prevents changing curswant. (zeertzjq) closes: vim/vim#14044 https://github.com/vim/vim/commit/fcaed6a70faf73bff3e5405ada556d726024f866
* fix(decorations): crash with revised mark with changed decoration flagsbfredl2024-02-17
| | | | fixes #27211
* test: more tests for nvim_eval_statusline "fillchar" (#27502)zeertzjq2024-02-17
|
* fix(api): don't use stl 'fillchar' for "use_statuscol_lnum" (#27501)luukvbaal2024-02-17
| | | | Problem: nvim_eval_statusline() uses "stl" from 'fillchars' with "use_statuscol_lnum". Solution: Reorder "fillchar" else chain.
* fix(treesitter): correctly handle query quantifiers (#24738)Thomas Vigouroux2024-02-16
| | | | | | | | | | | | | | | | | | | Query patterns can contain quantifiers (e.g. (foo)+ @bar), so a single capture can map to multiple nodes. The iter_matches API can not handle this situation because the match table incorrectly maps capture indices to a single node instead of to an array of nodes. The match table should be updated to map capture indices to an array of nodes. However, this is a massively breaking change, so must be done with a proper deprecation period. `iter_matches`, `add_predicate` and `add_directive` must opt-in to the correct behavior for backward compatibility. This is done with a new "all" option. This option will become the default and removed after the 0.10 release. Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: MDeiml <matthias@deiml.net> Co-authored-by: Gregory Anders <greg@gpanders.com>
* fix(genvimvim): generate prefixed boolean options properly (#27487)zeertzjq2024-02-16
|
* vim-patch:9.1.0112: Remove undo information, when cleaning quickfix bufferzeertzjq2024-02-16
| | | | | | | | | | | | | Problem: When the quickfix buffer has been modified an autocommand may invalidate the undo stack (kawarimidoll) Solution: When clearing the quickfix buffer, also wipe the undo stack fixes: vim/vim#13905 closes: vim/vim#13928 https://github.com/vim/vim/commit/f0d3d4a42657dca996e790aa829de3c6be7fdb63 Co-authored-by: Christian Brabandt <cb@256bit.org>
* refactor(eval): use arena when converting typvals to Objectbfredl2024-02-15
| | | | | | | | | | | | Note: this contains two _temporary_ changes which can be reverted once the Arena vs no-Arena distinction in API wrappers has been removed. Both nlua_push_Object and object_to_vim_take_luaref() has been changed to take the object argument as a pointer. This is not going to be necessary once these are only used with arena (or not at all) allocated Objects. The object_to_vim() variant which leaves luaref untouched might need to stay for a little longer.
* vim-patch:9.1.0111: filetype: no support for bats filesChristian Clason2024-02-15
| | | | | | | | | | | | | | The '*.bats' file type is for Bash Automated Testing System (BATS) scripts. BATS scripts are Bash with a special '@test' extension but they otherwise work with Vim's bash filetype. See https://github.com/bats-core/bats-core closes: vim/vim#14039 https://github.com/vim/vim/commit/d00fb4b3a237b375de5a1f453c8453b8b3797d51 Co-authored-by: Brandon Maier <brandon.maier@collins.com>
* vim-patch:9.1.0110: filetype: add 'Config.in' filetype detectionChristian Clason2024-02-15
| | | | | | | | | | | | | | | | | | The 'Config.in' file type is for Buildroot configuration files. Buildroot Config.in files use the same Kconfig backend as the Linux kernel's Kconfig files. Buildroot also has other filename variants that follow "Config.in.*", they are used to distinguish multiple Config.in files in the same directory. See https://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file closes: vim/vim#14038 https://github.com/vim/vim/commit/5f20f050efed3431beaf85739f0113e9ef0abd8e Co-authored-by: Brandon Maier <brandon.maier@collins.com>
* vim-patch:9.1.0109: filetype: no support for its filesChristian Clason2024-02-15
| | | | | | | | | | | | | | | | | Problem: filetype: no support for its files Solution: Add detection for *.its files as dts file type (Brandon Maier) The '*.its' file type is for U-Boot Flattened Image Trees (FIT) which use the flattened devicetree format. See https://github.com/u-boot/u-boot/blob/master/doc/usage/fit/source_file_format.rst#terminology closes: vim/vim#14037 https://github.com/vim/vim/commit/cf1d65e060e32ba8a0ba99fc299dc192fe4aa961 Co-authored-by: Brandon Maier <brandon.maier@collins.com>
* vim-patch:9.1.0108: filetype: no support for dtso filesChristian Clason2024-02-15
| | | | | | | | | | | | | | Problem: filetype: no support for dtso files Solution: Add detection for *.dtso files as dts file type (Markus Schneider-Pargmann) *.dtso files are devicetree overlay files which have the same syntax as dts or dtsi files. closes: vim/vim#14026 https://github.com/vim/vim/commit/b1700fb33fe02838d679b9215e501455cf4c1156 Co-authored-by: Markus Schneider-Pargmann <msp@baylibre.com>
* vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'zeertzjq2024-02-15
| | | | | | | | | | | | | | | Problem: Visual highlight hard to read with 'termguicolors' (Maxim Kim) Solution: Set Visual GUI foreground to black (with background=light) and lightgrey (with background=dark) (Maxim Kim) fixes: vim/vim#14024 closes: vim/vim#14025 https://github.com/vim/vim/commit/34e4a05d02a016fe230495be8f6c60ddd56f9567 Co-authored-by: Maxim Kim <habamax@gmail.com>
* fix(lsp): rename: load and list new buffer if attached to window (#27408)Tomasz N2024-02-14
|
* fix(extmarks): redraw line on adding/removing conceal (#27463)zeertzjq2024-02-14
|
* vim-patch:9.1.0105: Style: typos found (#27462)zeertzjq2024-02-14
| | | | | | | | | Problem: Style: typos found Solution: correct them (zeertzjq) closes: vim/vim#14023 https://github.com/vim/vim/commit/e71022082d6a8bd8ec3d7b9dadf3f9ce46ef339c
* refactor(lsp): resolve the config-client entanglementLewis Russell2024-02-13
| | | | | | | | | | | | | | | | | | | | | Previously the LSP-Client object contained some fields that are also in the client config, but for a lot of other fields, the config was used directly making the two objects vaguely entangled with either not having a clear role. Now the config object is treated purely as config (read-only) from the client, and any fields the client needs from the config are now copied in as additional fields. This means: - the config object is no longet normalised and is left as the user provided it. - the client only reads the config on creation of the client and all other implementations now read the clients version of the fields. In addition, internal support for multiple callbacks has been added to the client so the client tracking logic (done in lua.lsp) can be done more robustly instead of wrapping the user callbacks which may error.
* refactor(lua): use a keyset for vim.diff opts parsingbfredl2024-02-13
|
* refactor(lua): use Arena when converting from lua stack to API argsbfredl2024-02-13
| | | | | | | | | | | | and for return value of nlua_exec/nlua_call_ref, as this uses the same family of functions. NB: the handling of luaref:s is a bit of a mess. add api_luarefs_free_XX functions as a stop-gap as refactoring luarefs is a can of worms for another PR:s. as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves arbitrary return values.
* fix(loader): remove cyclic dependency on vim.fs (when --luamod-dev)Jongwook Choi2024-02-13
| | | | | | | | | | Problem: Loading `vim.fs` via the `vim.loader` Lua package loader will result in a stack overflow due to a cyclic dependency. This may happen when the `vim.fs` module isn't byte-compiled, i.e. when `--luamod-dev` is used (#27413). Solution: `vim.loader` depends on `vim.fs`. Therefore `vim.fs` should be loaded in advance.
* vim-patch:9.1.0101: upper-case of German sharp s should be U+1E9E (#27449)zeertzjq2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: upper-case of ß should be U+1E9E (CAPITAL LETTER SHARP S) (fenuks) Solution: Make gU, ~ and g~ convert the U+00DF LATIN SMALL LETTER SHARP S (ß) to U+1E9E LATIN CAPITAL LETTER SHARP S (ẞ), update tests (glepnir) This is part of Unicode 5.1.0 from April 2008, so should be fairly safe to use now and since 2017 is part of the German standard orthography, according to Wikipedia: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E#cite_note-auto-12 There is however one exception: UnicodeData.txt for U+00DF LATIN SMALL LETTER SHARP S does NOT define U+1E9E LATIN CAPITAL LETTER SHARP S as its upper case version. Therefore, toupper() won't be able to convert from lower sharp s to upper case sharp s (the other way around however works, since U+00DF is considered the lower case character of U+1E9E and therefore tolower() works correctly for the upper case version). fixes: vim/vim#5573 closes: vim/vim#14018 https://github.com/vim/vim/commit/bd1232a1faf56b614a1e74c4ce51bc6e0650ae00 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.0103: 'breakindentopt' "min" not correct with 'signcolumn' ↵zeertzjq2024-02-13
| | | | | | | | | | | (#27451) Problem: 'breakindentopt' "min" works incorrectly with 'signcolumn'. Solution: Use win_col_off() and win_col_off2(). (zeertzjq) closes: vim/vim#14014 https://github.com/vim/vim/commit/f0a9d65e0a1d693cdfa964aa72de5b93b4cacdea
* vim-patch:9.1.0102: settabvar() may change the last accessed tabpage (#27450)zeertzjq2024-02-13
| | | | | | | | | Problem: settabvar() may change the last accessed tabpage. Solution: Save and restore lastused_tabpage. (zeertzjq) closes: vim/vim#14017 https://github.com/vim/vim/commit/b47fbb40837512cdd2d8c25eaf9952154836b99d
* refactor(tests): get channel id via nvim_get_chan_info #27441Justin M. Keyes2024-02-12
| | | Minor "best practices" nudge.
* Merge pull request #27348 from fredizzimo/fsundvik/fix-ext-hlstatebfredl2024-02-12
|\ | | | | fix: crashes with large msgpack messages
| * test: add more hlstate testsFred Sundvik2024-02-05
| |
* | fix(extmarks): redraw pre-undo position (#27437)zeertzjq2024-02-12
| | | | | | | | | | | | | | Problem: Virtual text not redrawn properly after undo moves its extmark. Solution: Redraw the moved extmark's pre-undo position.
* | vim-patch:9.1.0098: CompleteChanged not triggered when new leader added ↵Raphael2024-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without matches (#27436) Problem: CompleteChanged not triggered when new leader added causing no matching item in the completion menu Solution: When completion is active but no items matched still trigger CompleteChanged event (glepnir) closes: vim/vim#13982 https://github.com/vim/vim/commit/0d3c0a66a39570cbc52b9536604c39e324b989b3 Fix #15077
* | perf(extmarks): avoid unnecessary invalidations for virt_text (#27435)zeertzjq2024-02-12
| | | | | | | | Invalidation of most w_valid flags isn't needed when adding or removing virtual text below cursor.