aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* vim-patch:9.1.0512: Mode message for spell completion doesn't match allowed ↵zeertzjq2024-06-21
| | | | | | | | | | | | | | | | | | keys (#29437) Problem: Mode message for spell completion doesn't match allowed keys (Kyle Kovacs) Solution: Show "^S" instead of "s". (zeertzjq) This matches the code in vim_is_ctrl_x_key(): case CTRL_X_SPELL: return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N); fixes: neovim/neovim#29431 closes: vim/vim#15065 https://github.com/vim/vim/commit/7002c055d560ae0b3bb1e24ad409390a5443daad
* vim-patch:9.1.0511: CursorMovedC triggered wrongly with setcmdpos()zeertzjq2024-06-21
| | | | | | | | | | | Problem: CursorMovedC triggered wrongly with setcmdpos() (after v9.1.0507) Solution: Remove the premature triggering. Also don't trigger when cursor didn't move. (zeertzjq) closes: vim/vim#15064 https://github.com/vim/vim/commit/bc6f96708e3678dbb27ec4192d87cf94a15d4e9a
* vim-patch:9.1.0507: hard to detect cursor movement in the command linezeertzjq2024-06-21
| | | | | | | | | | | | Problem: hard to detect cursor movement in the command line Solution: Add the CursorMovedC autocommand (Shougo Matsushita) closes: vim/vim#15040 https://github.com/vim/vim/commit/d09521476f41dd8dbddb25b7acd0b299f9bf94d3 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* fix(treesitter): don't open fold when o/O adds a line below #28709Jaehwang Jung2024-06-20
| | | | | | | | | | | Problem: `o`-ing on a folded line opens the fold, because the new line gets the fold level from the above line (level '='), which extends the fold to the new line. `O` has a similar problem when run on the line below a fold. Solution: Use -1 for the added line to get the lower level from the above/below line.
* vim-patch:9.1.0505: filetype: Faust files are not recognized (#29426)zeertzjq2024-06-20
| | | | | | | | | | | | Problem: filetype: Faust files are not recognized Solution: Detect '*.lib' files as Faust filetype, add detection for '*.dsp' files (Faust or Make), remove '*.lib' from Cobol filetype (PowerUser64) closes: vim/vim#14894 https://github.com/vim/vim/commit/aa61b8a9087e9cd999ef07e0d87b60f43d68f2c6 Co-authored-by: PowerUser64 <blake@blakenorth.net>
* Merge pull request #29413 from jiangyinzuo/vim-patch-9.1.0497zeertzjq2024-06-20
|\ | | | | vim-patch:partial:9.1.{0497,0501}: termdebug can be further improved
| * vim-patch:partial:9.1.0501: too complicated mapping restore in termdebugYinzuo Jiang2024-06-20
| | | | | | | | | | | | | | | | | | | | | | | | Problem: too complicated mapping restore in termdebug Solution: simplify unmapping logic, add a few more tests (Ubaldo Tiberi) closes: vim/vim#15046 https://github.com/vim/vim/commit/46f2823807741ac91c51cf36ddabf293db26ab41 Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
| * vim-patch:partial:9.1.0497: termdebug can be further improvedYinzuo Jiang2024-06-19
| | | | | | | | | | | | | | | | | | | | | | | | Problem: termdebug can be further improved Solution: refactor save/restore, update docs, add a new save/restore test (Ubaldo Tiberi) closes: vim/vim#15032 https://github.com/vim/vim/commit/a48637c105ce5ccf6f3296958c889d15dc3faaa4 Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
* | vim-patch:9.1.0504: inner-tag textobject confused about ">" in attributes ↵zeertzjq2024-06-20
|/ | | | | | | | | | | | | (#29420) Problem: inner-tag textobject confused about ">" in attributes Solution: Skip over quoted '>' when determining the start position fixes: vim/vim#15043 closes: vim/vim#15049 https://github.com/vim/vim/commit/ca7f93e6f351b310c17cfc8f88acf21c839d6116 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(drawline): don't draw beyond end of window with 'rnu' (#29406)zeertzjq2024-06-19
|
* vim-patch:8.2.5047: CurSearch highlight is often wrongzeertzjq2024-06-19
| | | | | | | | | Problem: CurSearch highlight is often wrong. Solution: Remember the last highlighted position and redraw when needed. https://github.com/vim/vim/commit/368137aa525982984beed73940af481ac53a62af Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.0499: MS-Windows: doesn't handle symlinks properly (#29400)zeertzjq2024-06-19
| | | | | | | | | | | | | | | | | | | Problem: MS-Windows: doesn't handle symlinks properly (Timothy Madden) Solution: Implement lstat() on MS-Windows (author) lstat() differs from stat() in how it handles symbolic links, the former doesn't resolve the symlink while the latter does so. Implement a simple yet effective fallback using Win32 APIs. fixes vim/vim#14933 closes: vim/vim#15014 https://github.com/vim/vim/commit/23c5ebeb95cb942df307946e3ced230a7c8312eb Co-authored-by: LemonBoy <thatlemon@gmail.com> Co-authored-by: K.Takata <kentkt@csc.jp>
* fix(mouse): early return when clicking in padded 'statuscolumn' (#29394)luukvbaal2024-06-19
| | | | | | Problem: Hit assert when clicking inside a padded 'statuscolumn' that is padded beyond the length of the allocated click_defs. Solution: Still consider this a "in_statuscol" click, but return early when about to execute the click func.
* vim-patch:9.1.0498: getcmdcompltype() interferes with cmdline completion ↵zeertzjq2024-06-19
| | | | | | | | | | | (#29397) Problem: getcmdcompltype() interferes with cmdline completion. Solution: Don't set expand context when it's already set. (zeertzjq) closes: vim/vim#15036 https://github.com/vim/vim/commit/a821b609f9bb9daef032fe1cb8fb95995822e367
* refactor(lua): remove unnecessary strlen() in nlua_expand_pat() (#29388)zeertzjq2024-06-18
| | | | Also change the initial value of `status` to `FAIL`, as that'll avoid unnecessary assignments.
* refactor: Windows tilde expansion followup (#29380)Rafael Kitover2024-06-18
| | | | | | | | | | | | | | | | | | | | | | | Followup to #28515: Rename the static os_homedir() to os_uv_homedir() to emphasize that it is a wrapper around a libuv function. Add the function os_get_homedir() to os/env.c to return the cached homedir value as a const. Must be called after homedir is initialized or it fails. The difference between this function and the static os_uv_homedir() is that the latter gets the homedir from libuv and is used to initialize homedir in init_homedir(), while os_get_homedir() just returns homedir as a const if it's initialized and is public. Use the os_get_homedir() accessor for ~/ expansion on Windows to make the code more concise. Add a Windows section to main_spec.lua with tests for expanding ~/ and ~\ prefixes for files passed in on the command-line. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* fix(lua): find length of completion prefix earlier (#29384)zeertzjq2024-06-18
| | | | | Do the expansion right after setting the expand context, so that the length of the completion prefix can be set, but don't do that directly in set_one_cmd_context(), as that's also called by getcmdcompltype().
* vim-patch:9.1.0496: matched text is highlighted case-sensitivelyzeertzjq2024-06-18
| | | | | | | | | | | | | Problem: matched text is highlighted case-sensitively Solution: use MB_STRNICMP, update highlighting when the base changes (glepnir) fixes: vim/vim#15021 closes: vim/vim#15023 https://github.com/vim/vim/commit/f189138b39a11ed5cf3adea6610469b478841aba Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.0495: Matched text isn't highlighted in cmdline pumzeertzjq2024-06-18
| | | | | | | | | | | | Problem: Matched text isn't highlighted in cmdline pum. Solution: Use cmdline completion pattern in cmdline mode. (zeertzjq) closes: vim/vim#15029 https://github.com/vim/vim/commit/d8c9340fc67ca19f82ec3e77ec38296424e758cf Cherry-pick syntax.txt change from runtime update.
* vim-patch:9.1.0494: Wrong matched text highlighted in pum with 'rightleft' ↵zeertzjq2024-06-17
| | | | | | | | | | | (#29371) Problem: Wrong matched text highlighted in pum with 'rightleft'. Solution: Match using the original text instead of the reversed text. (zeertzjq) closes: vim/vim#15020 https://github.com/vim/vim/commit/63901e89638d683ecbc8e3323170dd485657fd1d
* Merge pull request #29357 from luukvbaal/statuscolzeertzjq2024-06-17
|\ | | | | feat(column)!: rework 'statuscolumn' %r/l items
| * feat(column)!: rework 'statuscolumn' %r/l itemsLuuk van Baal2024-06-16
| | | | | | | | | | | | | | Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item.
* | vim-patch:9.1.0492: filetype: Vim-script files not detected by shebang lineChristian Clason2024-06-16
| | | | | | | | | | | | | | | | | | | | | | Problem: Vim-script files may not be recognised Solution: Add shebang line detection (Doug Kearns) closes: vim/vim#15012 https://github.com/vim/vim/commit/0d4d23dac0a5a77ccb0ebf1dcf646afe0c6886bf Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* | vim-patch:9.1.0493: Test for patch 9.1.0489 doesn't fail without the fix ↵zeertzjq2024-06-16
| | | | | | | | | | | | | | | | | | | | | | (#29366) Problem: Test for patch 9.1.0489 doesn't fail without the fix. Solution: Use "!" flag of feedkeys() so that ex_normal_busy is not set and ins_compl_check_keys() is not skipped (zeertzjq). closes: vim/vim#15018 https://github.com/vim/vim/commit/acc87469415ba10283e5a53a8a11424f4867bbcf
* | vim-patch:9.1.0489: default completion may break with fuzzy (#29364)zeertzjq2024-06-16
| | | | | | | | | | | | | | | | | | | | | | Problem: default completion may break with fuzzy Solution: check that completion_match_array is not null (glepnir) closes: vim/vim#15010 https://github.com/vim/vim/commit/aced8c2f4fd1cf3f8ac7cdb0dd54d19ef4390ef8 Co-authored-by: glepnir <glephunter@gmail.com>
* | vim-patch:9.1.0491: Cmdline pum doesn't work properly with 'rightleft' (#29355)zeertzjq2024-06-15
|/ | | | | | | | | | | Problem: Cmdline pum doesn't work properly with 'rightleft'. Solution: Don't use curwin->w_p_rl in cmdline mode in pum_redraw(). Use a static variable since pum_may_redraw() may be called in any mode. Also correct position of other popups with 'rightleft'. (zeertzjq) closes: vim/vim#15005 https://github.com/vim/vim/commit/883018feff43413813770dd1e13d4f950aa38524
* vim-patch:9.1.0488: Wrong padding for pum "kind" with 'rightleft' (#29352)zeertzjq2024-06-15
| | | | | | | | | | | | | | Problem: Wrong padding for pum "kind" with 'rightleft'. Solution: Fix off-by-one error (zeertzjq). The screen_fill() above is end-exclusive, and - With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`, so the next `col` should be `pum_col - pum_base_width - n`. - With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`, so the next `col` should be `pum_col - pum_base_width + n`. closes: vim/vim#15004 https://github.com/vim/vim/commit/a2324373eb1c3f1777bc40cb6dcd5e895a15fe10
* vim-patch:9.1.0486: filetype: Snakemake files are not recognizedChristian Clason2024-06-15
| | | | | | | | | | | | | | | | Problem: filetype: Snakemake files are not recognized Solution: Detect '*.smk' and Snakefile files as snakemake filetype (Riley Bruins) See: https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility closes: vim/vim#14992 https://github.com/vim/vim/commit/82a579e15ad78f4b99d2957300da3076ccc7d378 Co-authored-by: Riley Bruins <ribru17@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(defaults): default @/Q broken when 'ignorecase' is set (#29343)Jerry2024-06-15
| | | | | | | | | | | | | | | Problem: When 'ignorecase' is set, the default keymap Q and Q would exit visual mode. This issue was raised in #28287 and a fix was applied in #28289. However, `==` operator is subject to user `ignorecase` setting. Solution: Switching to `==#` operator would guarantee case sensitive comparison between visual mode and linewise visual mode. Co-authored-by: Kuanju Chen <kuanju.chen@mksinst.com>
* vim-patch:9.1.0487: completed item not update on fuzzy completion (#29341)zeertzjq2024-06-15
| | | | | | | | | | | Problem: completed item not update on fuzzy completion Solution: reset compl_shown_match when at original match position (glepnir) closes: vim/vim#14955 https://github.com/vim/vim/commit/f94c9c482a6dd488f0136ac99499eb6e2ab3ccca Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.0485: Matched text shouldn't be highlighted in "kind" and "menu"zeertzjq2024-06-15
| | | | | | | | | | Problem: Matched text shouldn't be highlighted in "kind" and "menu". Solution: Pass hlf_T instead of the attribute. Fix indent. (zeertzjq) closes: vim/vim#14996 https://github.com/vim/vim/commit/afbe5359e981e5d19ad23c394aefe60395c3648e
* vim-patch:9.1.0476: Cannot see matched text in popup menuzeertzjq2024-06-15
| | | | | | | | | | | | Problem: Cannot see matched text in popup menu Solution: Introduce 2 new highlighting groups: PmenuMatch and PmenuMatchSel (glepnir) closes: vim/vim#14694 https://github.com/vim/vim/commit/40c1c3317d92f8c2adadf744fab72e4458e2a9fa Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.0484: Sorting of completeopt+=fuzzy is not stable (#29338)zeertzjq2024-06-15
| | | | | | | | | Problem: Sorting of completeopt+=fuzzy is not stable. Solution: Compare original indexes when scores are the same. (zeertzjq) closes: vim/vim#14988 https://github.com/vim/vim/commit/8e56747fd26b3b040b6fcbfb6be41b7d5922c6b5
* fix(lsp): tune completion word extraction for decorated labels (#29331)Mathias Fußenegger2024-06-14
| | | | | | | | | | | | | | Problem: For snippets lsp.completion prefers the label if it is shorter than the insertText or textEdit to support postfix completion cases but clangd adds decoration characters to labels. E.g.: `•INT16_C(c)` Solution: Use parse_snippet on insertText/textEdit before checking if it is shorter than the label. Fixes https://github.com/neovim/neovim/issues/29301
* fix(highlight): add `StatusLineTerm`/`StatusLineTermNC` to `:color vim` (#29313)Evgeni Chasnovski2024-06-14
| | | | | | | | | | | | | | | Problem: both `StatusLineTerm`/`StatusLineTermNC` are now explicitly used, but `:color vim` does not set them to the values used in Vim. This might be fine if `:color vim` is treated as "the state of default color scheme prior the big update", but it seems to be better treated as "Vim's default color scheme" (how it is documented in its header). Solution: add `StatusLineTerm`/`StatusLineTermNC` definitions to 'runtime/colors/vim.lua'. Use explicit foreground colors ('Whte'/'Black') instead of `guifg=bg` used in source, as the latter caused some problems in the past (if `Normal` is not defined, `nvim_set_hl()` can't recognize `'bg'` as the foreground value). Also realign the rest of the background conditional highlight groups.
* refactor(lsp): use metatable for buf_versions (#29304)Ilia Choly2024-06-14
| | | | | | This reduces the number of nil checks around buf_versions usage Test changes were lifted from 5c33815 Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* vim-patch:partial:9.1.0482: termdebug plugin needs more love (#29329)Yinzuo Jiang2024-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: termdebug plugin needs more love Solution: start with some more Vim9 refactoring to improve maintenance and readability (Ubaldo Tiberi) List of Changes and the Reasoning Behind Them: 1) Introduction of InitScriptVariables() Function: Reasoning: This function has been introduced to ensure that when you open and close Termdebug, and then open it again, there are no leftover script variable values from the previous session. Leftover values could potentially cause issues. The goal is for each Termdebug session to be independent of previous sessions. At startup, all script variables are initialized. The only exception is g:termdebug_loaded located at the very beginning of the script to prevent sourcing the script twice. The variables are declared at script level and defined in InitScriptVariables(). 2) More Descriptive Variable Names: Reasoning: The names of variables have been made more comprehensive. Almost every Termdebug buffer now has a variable to indicate its name and another variable to indicate its number, improving code readability and maintainability. Due to the latest discussion around the &mousemodel option save/restore mechanism, perhaps some other variables shall be prepended with saved_. 3) Consistent Naming for GDB Terminal Buffers: Reasoning: The name of the GDB terminal buffer now matches the name of the GDB program being used, e.g., 'gdb', 'mygdb', 'arm-eabi-none-gdb', etc. This ensures clarity and consistency in identifying buffers. 4) Other minor improvements: Moved EchoErr() on top, added another test, some refactoring, mainly changed several 0 and 1 to true and false closes: vim/vim#14980 https://github.com/vim/vim/commit/ef8eab86e29091eaff0d3fb0bc3f7c90f468f6aa Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
* fix(terminal): set local values of window options (#29326)zeertzjq2024-06-14
|
* vim-patch:9.1.0483: glob() not sufficiently tested (#29323)zeertzjq2024-06-14
| | | | | | | | | | Problem: glob() not sufficiently tested Solution: Add more tests for directory containing [] chars related: vim/vim#14991 https://github.com/vim/vim/commit/8b34aea1b0431082a062ecfb5de0f244f3f23418 Co-authored-by: Christian Brabandt <cb@256bit.org>
* Merge pull request #29103 from gpanders/test-no-tgcGregory Anders2024-06-12
|\ | | | | test: do not set termguicolors in test runner
| * test: remove checks for failed tests on WindowsGregory Anders2024-05-31
| |
| * test: do not set termguicolors in test runnerGregory Anders2024-05-31
| | | | | | | | | | It's not clear why this is needed and it has adverse side effects on other tests.
* | Merge pull request #29303 from lewis6991/fix/wobufLewis Russell2024-06-12
|\ \ | | | | | | fix(vim.wo): never allow non-zero bufnr
| * | test: fix vim.deprecate testsLewis Russell2024-06-12
| | |
| * | fix(vim.wo): never allow non-zero bufnrLewis Russell2024-06-12
| | |
* | | refactor(terminal): move :terminal defaults to _defaults.luaGregory Anders2024-06-12
| | |
* | | feat(highlight): add StatusLineTerm and StatusLineTermNC groupsGregory Anders2024-06-12
|/ / | | | | | | | | | | | | These highlight groups are used for the statusline in :terminal windows. By default they link to StatusLine and StatusLineNC (respectively), so there is no visual difference unless a colorscheme defines these groups separately.
* | vim-patch:9.1.0477: block_editing errors out when using <enter> (#29294)zeertzjq2024-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: block_editing errors out when using <enter> (Ali Rizvi-Santiago, after v9.1.0274) Solution: Change ins_len from size_t to int so that the test if ins_len is negative actually works properly Add a test, so that this doesn't regress. fixes: vim/vim#14960 https://github.com/vim/vim/commit/1fb9eae5794c3f808468fbc2935c5144f9e0b5b1 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | feat(terminal): add support for copying with OSC 52 in embedded terminal ↵Gregory Anders2024-06-11
| | | | | | | | | | | | | | | | | | (#29117) When libvterm receives the OSC 52 escape sequence it ignores it because Nvim does not set any selection callbacks. Install selection callbacks that forward to the clipboard provider, so that setting the clipboard with OSC 52 in the embedded terminal writes to the system clipboard using the configured clipboard provider.
* | fix(column): clamp line number for legacy signsLuuk van Baal2024-06-10
| | | | | | | | | | | | | | | | Problem: Legacy :sign API still allows placing signs beyond the end of the buffer. This is unaccounted for by the signcolumn tracking logic and is disallowed in general for the extmark API which implements it now. Solution: Clamp legacy sign line number to the length of the buffer.