aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* 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.
* | fix(column): use a single path for sign sorting (#27431)luukvbaal2024-02-12
| | | | | | | | | | | | Problem: #25826 added a (duplicate) sign comparison function, which was modified and strayed from the original in #27418. Solution: Merge the two functions and add a display test that actually tests for this order in addition to the legacy tests.
* | vim-patch:9.1.0097: 'breakindent' behaves inconsistently with 'list' and ↵zeertzjq2024-02-12
| | | | | | | | | | | | | | | | | | | | | | | | splits (#27432) Problem: 'breakindent' behaves inconsistently with 'list' and splits. Solution: Use 'listchars' from the correct window and handle caching properly. Move cheaper comparisons to the top. (zeertzjq) closes: vim/vim#14008 https://github.com/vim/vim/commit/efabd7c8d4f733350364356b8950a11f013aec49
* | refactor(indent): refactor computing of a string's indent size (#27252)VanaIgr2024-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `get_indent_str_vtab()` function currently calls `tabstop_padding()` every time a tab is encountered (unless tabstops aren't used). `tabstop_padding()` either does a division by 'tabstop' If 'vartabstop' is not set, or iterates through the 'vartabstop' list to find current tab width. Since the virtual column only increases, we can keep track of where the next tabstop would be, and update this information once it was reached. `get_indent_str_vtab()` also depends on 'listchars' "tab" value from the current window, even though it may be called for a line from the same buffer in a different window. In most cases, it is called with tabstops enabled (last argument was `false`), so I split the function into one that uses tabstops and the other that doesn't. I removed `get_indent_str()` since I couldn't find any calls to it.
* | refactor(lsp): move more code to client.luaLewis Russell2024-02-11
| | | | | | | | | | | | | | | | | | | | | | | | The dispatchers used by the RPC client should be defined in the client, so they have been moved there. Due to this, it also made sense to move all code related to client configuration and the creation of the RPC client there too. Now vim.lsp.start_client is significantly simplified and now mostly contains logic for tracking open clients. - Renamed client.new -> client.start
* | fix(messages): clear new lines when increasing 'cmdheight' (#27421)zeertzjq2024-02-11
| |
* | feat(shortmess): "q" flag fully hides recording message (#27415)Trevor Arjeski2024-02-11
| | | | | | | | | | | | | | When "q" is set in 'shortmess' it now fully hides the "recording @a" message when you are recording a macro instead of just shortening to "recording". This removes duplication when using reg_recording() in the statusline. Related #19193
* | test(ui/mouse_spec): make sure click is processed (#27412)zeertzjq2024-02-10
| |
* | vim-patch:9.1.0087: Restoring lastused_tabpage too early in do_arg_all() ↵Raphael2024-02-10
| | | | | | | | | | | | | | | | | | | | | | | | (#27411) Problem: Restore lastused_tabpage too early in do_arg_all() function it will change later in the function. Solution: Restore lastused_tabpage a bit later, when being done with tabpages (glepnir) closes: vim/vim#13992 https://github.com/vim/vim/commit/2975a54f285e5b4bf026c1dc706b5d90777d64e7
* | test: add test for scroll wheel at right-click menu (#27409)zeertzjq2024-02-10
| |
* | fix(startup): multiprocess startuptime #26790Pablo Arias2024-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Since 24488169564c39a506c235bf6a33b8e23a8cb528, the --startuptime report shows two blocks of data. The TUI process and its embedded nvim process write to the file concurrently, which may interleave the two startup sequences into the same timeline. Solution: Report each process as a separate section in the same file. 1. Each process buffers the full report. 2. After startup is finished, the buffer is flushed (appended) to the file. Fix #23036 Sample report: --- Startup times for process: Primary/TUI --- times in msec clock self+sourced self: sourced script clock elapsed: other lines 000.006 000.006: --- NVIM STARTING --- 000.428 000.422: event init 000.728 000.301: early init ... 005.880 000.713: init highlight 005.882 000.002: --- NVIM STARTED --- --- Startup times for process: Embedded --- times in msec clock self+sourced self: sourced script clock elapsed: other lines 000.006 000.006: --- NVIM STARTING --- 000.409 000.403: event init 000.557 000.148: early init 000.633 000.077: locale set ... 014.383 000.430: first screen update 014.387 000.003: --- NVIM STARTED ---
* | vim-patch:9.1.0088: TextChanged not triggered for :norm! commands (#27405)zeertzjq2024-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: TextChanged not triggered for :norm! commands (machakann, after v9.0.2031) Solution: Only reset curbuf->b_last_changedtick if TextChangedI was triggered in insert mode (and not blocked) Note: for unknown reasons, the test fails on Windows (but seems to work fine when running interactively) fixes: vim/vim#13967 closes: vim/vim#13984 https://github.com/vim/vim/commit/c9e79e52845d51f48f5ea3753a62ab3fe0e40184 Cherry-pick test_autocmd.vim change from patch 8.2.4149. Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.0084: Visual hl wrong when it ends before multibyte ↵zeertzjq2024-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'showbreak' (#27404) Problem: Visual hl wrong when it ends before multibyte 'showbreak'. (lacygoil) Solution: Use vcol_sbr instead of adding n_extra. (zeertzjq) fixes: vim/vim#11272 closes: vim/vim#13996 https://github.com/vim/vim/commit/df23d7f4bd7546f3152ea003856525591218565b Bug doesn't apply to Nvim.
* | Merge pull request #27391 from bfredl/arenarockbfredl2024-02-08
|\ \ | | | | | | refactor(api): refactor more api functions to use arena return
| * | refactor(api): refactor more api functions to use arena returnbfredl2024-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently having two separate memory strategies for API return values is a bit unnecessary, and mostly a consequence of converting the hot spot cases which needed it first. But there is really no downside to using arena everywhere (which implies also directly using strings which are allocated earlier or even statically, without copy). There only restriction is we need to know the size of arrays in advance, but this info can often be passed on from some earlier stage if it is missing. This collects some "small" cases. The more complex stuff will get a PR each.
* | | feat(lsp): deprecate severity_limitLewis Russell2024-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `vim.lsp.diagnostic.on_diagnostic` accepts an undocumented severity_limit option which is widely used. Solution: Deprecate it in favour of `{min = severity}` used in `vim.diagnostic`. Since this is undocumented, the schedule for removal is accelerated to 0.11.
* | | Revert "fixup! add benchmark"Lewis Russell2024-02-08
| | | | | | | | | | | | This reverts commit b0bff57a3bc79481d89595791e3fb0e4dd10c896.
* | | fixup! add benchmarkLewis Russell2024-02-08
| | |
* | | vim-patch:9.1.0083: Redrawing can be improved when deleting lines with 'number'zeertzjq2024-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Redrawing can be improved when inserting/deleting lines with 'number'. Solution: Only redraw the number column of lines below changed lines. Add a test as this wasn't previously tested. (zeertzjq) closes: vim/vim#13985 https://github.com/vim/vim/commit/ae07ebc04b0726e12b1af39d52e01d86ae79ef0a
* | | vim-patch:9.1.0082: Redrawing can be improved when deleting lines with ↵zeertzjq2024-02-08
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 'cursorline' Problem: Redrawing can be improved when deleting lines with 'cursorline'. Solution: Use smarter invalidation and adjustment. Remove unnecessary UPD_VALID as it is already set at the top of the loop. Make the test for vim/vim#4862 fail without the fix. (zeertzjq) closes: vim/vim#13986 https://github.com/vim/vim/commit/7ce34c9a947b17a8b5e81e7c2335a63552182d10
* | feat(api): pass 0 to nvim_get_chan_info for current channel (#27321)nikolightsaber2024-02-08
| | | | | | | | | | | | | | | | | | | | | | Getting current channel info was kind of annoying via RPC. Two functions had to be called: 1. `nvim_get_api_info` which returns `[channel_id, meta_data]`. - This results in `channel_id = api.nvim_get_api_info()[0]`. - Here the meta_data is sent but never used. 2. Finally call `nvim_get_chan_info(channel_id)`. This commit reduces the need for `nvim_get_api_info` as passing 0 returns current channel info.
* | refactor(api): use keydict and arena for more api return valuesbfredl2024-02-08
| | | | | | | | | | | | | | Implement api_keydict_to_dict as the complement to api_dict_to_keydict Fix a conversion error when nvim_get_win_config gets called from lua, where Float values "x" and "y" didn't get converted to lua numbers.
* | perf: improve utf_char2cells() performance (#27353)VanaIgr2024-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `utf_char2cells()` calls `utf_printable()` twice (sometimes indirectly, through `vim_isprintc()`) for characters >= 128. The function can be refactored to call to it only once. `utf_printable()` uses binary search on ranges of unprintable characters to determine if a given character is printable. Since there are only 9 ranges, and the first range contains only one character, binary search can be replaced with SSE2 SIMD comparisons that check 8 ranges at a time, and the first range is checked separately. SSE2 is enabled by default in GCC, Clang and MSVC for x86-64. Add 3-byte utf-8 to screenpos_spec benchmarks.
* | fix(event-loop): process input before events (#27358)zeertzjq2024-02-07
| | | | | | | | | | | | | | | | | | | | | | Problem: When nvim_input is followed immediately by non-fast events on RPC, both events and input are available after the polling done by the os_inchar() in state_enter(), but state_enter() then chooses to process events even if input is available, which is inconsistent with state_handle_k_event() that stops processing events once input is available. Solution: Also check for available input after the os_inchar() in state_enter().
* | feat(treesitter): show root nodes in :InspectTree (#26944)altermo2024-02-06
| | | | | | | | Co-authored-by: altermo <> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
* | fix(column): handle w_redr_statuscol at end filler lines (#27365)zeertzjq2024-02-06
| | | | | | | | There doesn't seem to be an easy solution that doesn't involve a goto. Also remove duplicate assignment in win_line().
* | vim-patch:9.1.0079: LineNrAbove/Below highlighting wrong on wrapped lines ↵zeertzjq2024-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | (#27363) Problem: LineNrAbove and LineNrBelow background wrong on wrapped lines. Solution: Update number column also for wrapped part of a line. (zeertzjq) closes: vim/vim#13974 https://github.com/vim/vim/commit/ebfd856cfdf6ea0b16c8d115000961c998ce97da Cherry-pick test_number.vim changes from patch 9.0.0626.
* | docs: small fixes (#27213)dundargoc2024-02-06
| | | | | | Co-authored-by: Matthieu Coudron <886074+teto@users.noreply.github.com>
* | test(tui_spec): prevent race between nvim_input and nvim_paste (#27356)zeertzjq2024-02-06
| |
* | test: add test for 'foldcolumn' with cmdwin (#27355)zeertzjq2024-02-06
| |
* | fix(tui): `space_buf` overflow when clearing screen (#27352)Sean Dewar2024-02-06
| | | | | | | | | | | | | | | | | | Problem: `tui->space_buf` may be smaller than the width of the TUI or widest grid, causing an overflow when calling `tui_grid_clear` if `print_spaces` is called from `clear_region` (clears the TUI's screen since #23428). Solution: resize `space_buf` to be wide enough to fit the TUI or widest grid. Didn't bother shrinking the allocation if the max widths decrease.
* | test(treesitter): add test cases for inspect_treeJongwook Choi2024-02-05
| | | | | | | | Co-authored-by: altermo <107814000+altermo@users.noreply.github.com>