aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* feat(health): summary in section heading #33388Yochem van Rosmalen2025-04-09
| | | | | | | | Problem: As checkhealth grows, it is increasingly hard to quickly glance through the information. Solution: Show a summary of ok, warn, and error outputs per section.
* fix(editor): respect [+cmd] when executing :drop #33339jyn2025-04-08
| | | | | | | | | | | | | | Problem: Normally, `:drop +41 foo.txt` will open foo.txt with the cursor on line 41. But if foo.txt is already open, it instead is a no-op, even if the cursor is on a different line. Steps to reproduce: nvim --clean foo.txt :drop +30 foo.txt Solution: Handle +cmd in ex_drop().
* fix(display): scroll redrawing doesn't account for virt_lines above fold #33374luukvbaal2025-04-08
| | | | | | Problem: Logic computing the new height of the modified area does not take into account virtual lines attached to a folded line. Solution: Remove `hasFolding()` branch and let `plines_win_full()` do its job.
* vim-patch:9.1.1283: quickfix stack is limited to 10 itemszeertzjq2025-04-08
| | | | | | | | | | | | | | Problem: quickfix and location-list stack is limited to 10 items Solution: add the 'chistory' and 'lhistory' options to configure a larger quickfix/location list stack (64-bitman) closes: vim/vim#16920 https://github.com/vim/vim/commit/88d41ab270a8390a43da97a903b1a4d76b89d330 Co-authored-by: 64-bitman <60551350+64-bitman@users.noreply.github.com> Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1253: abort when closing window with attached quickfix datazeertzjq2025-04-08
| | | | | | | | | | | | | | | | | | | Problem: If win_close() is called with a window that has quickfix stack attached to it, the corresponding quickfix buffer will be closed and freed after the buffer was already closed. At that time curwin->w_buffer points to NULL, which the CHECK_CURBUF will catch and abort if ABORT_ON_ERROR is defined Solution: in wipe_qf_buffer() temporarily point curwin->w_buffer back to curbuf, the window will be closed anyhow, so it shouldn't matter that curbuf->b_nwindows isn't incremented. closes: vim/vim#16993 closes: vim/vim#16985 https://github.com/vim/vim/commit/ce80c59bfd3c0087a354ee549639ca60fa192fba Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1286: filetype: help files not detected when 'iskeyword' ↵zeertzjq2025-04-08
| | | | | | | | | | | includes ":" (#33377) Problem: Help files not detected when 'iskeyword' includes ":". Solution: Do not use \< and \> in the pattern (zeertzjq). fixes: vim/vim#17069 closes: vim/vim#17071 https://github.com/vim/vim/commit/e370141bf41919642061ee2e78340dca84678712
* fix(decor): enable decoration provider in on_start #33337luukvbaal2025-04-07
| | | | | | | | Problem: An on_win-disabled decoration provider is left disabled for the on_buf callback during the next redraw (if the provider does not subscribe to on_end). Solution: Move re-activation of the provider from after the on_end callback to before the on_start callback.
* fix(vim.hl): nvim_buf_del_extmark on invalid buffer #33331phanium2025-04-05
| | | | | | | Problem: nvim_buf_del_extmark error if buffer is destroyed before timer stops Solution: check nvim_buf_is_valid.
* vim-patch:9.1.1276: inline word diff treats multibyte chars as word char ↵zeertzjq2025-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#33323) Problem: inline word diff treats multibyte chars as word char (after 9.1.1243) Solution: treat all non-alphanumeric characters as non-word characters (Yee Cheng Chin) Previously inline word diff simply used Vim's definition of keyword to determine what is a word, which leads to multi-byte character classes such as emojis and CJK (Chinese/Japanese/Korean) characters all classifying as word characters, leading to entire sentences being grouped as a single word which does not provide meaningful information in a diff highlight. Fix this by treating all non-alphanumeric characters (with class number above 2) as non-word characters, as there is usually no benefit in using word diff on them. These include CJK characters, emojis, and also subscript/superscript numbers. Meanwhile, multi-byte characters like Cyrillic and Greek letters will still continue to considered as words. Note that this is slightly inconsistent with how words are defined elsewhere, as Vim usually considers any character with class >=2 to be a "word". related: vim/vim#16881 (diff inline highlight) closes: vim/vim#17050 https://github.com/vim/vim/commit/9aa120f7ada592ed03b37f4de8ee413c5385f123 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* fix(messages): verbose message emitted without kind #33305luukvbaal2025-04-04
| | | | | Problem: Successive autocmd verbose messages may be emitted without a kind. Solution: Always set the kind when preparing to emit a verbose message.
* feat(defaults): store spellfile in stdpath('data') #33048Yochem van Rosmalen2025-04-04
| | | | | | | | | | | Problem: First rtp directory is unpredictable and not in line with XDG base spec. Solution: Use stdpath('data')/spell as directory if 'spellfile' is not set. Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:9.1.1271: filetype: Power Query files are not recognizedChristian Clason2025-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Power Query files are not recognized Solution: detect '*.pq' as pq filetype, include pq syntax and filetype plugin (Anarion Dunedain) Microsoft Power Query provides a powerful data import experience that encompasses many features. Power Query works with desktop Analysis Services, Excel, and Power BI workbooks, in addition to many online services, such as Fabric, Power BI service, Power Apps, Microsoft 365 Customer Insights, and more. A core capability of Power Query is to filter and combine, that is, to mash-up data from one or more of a rich collection of supported data sources. Any such data mashup is expressed using the Power Query M formula language. The M language is a functional, case sensitive language similar to F#. Reference: - Power Query M formula language overview: https://learn.microsoft.com/en-us/powerquery-m/ closes: vim/vim#17045 https://github.com/vim/vim/commit/e74ec3f523a152f62a37cc3ab476f0e5a2e812c6 Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
* Merge pull request #33282 from glepnir/vim-9.1.1269zeertzjq2025-04-04
|\ | | | | vim-patch:9.1.{1269,1272}
| * vim-patch:9.1.1272: completion: in keyword completion Ctrl_P cannot go back ↵glepnir2025-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after Ctrl_N Problem: completion: in keyword completion Ctrl_P cannot go back after Ctrl_N Solution: in find_compl_when_fuzzy() always return first match of array, after Ctrl_P use compl_shown_match->cp_next instead of compl_first_match. (glepnir) closes: vim/vim#17043 https://github.com/vim/vim/commit/3e50a28a03d136c1e0c1f4fabe50d97faaf08c5c Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.1269: completion: compl_shown_match is updated when starting ↵glepnir2025-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keyword completion Problem: compl_shown_match is updated when starting keyword completion and does not include fuzzy matching. Solution: Do not update compl_shown_match when starting keyword completion, since it is the one already selected by the keyword completion direction. (glepnir) closes: vim/vim#17033 https://github.com/vim/vim/commit/e4e4d1c381e9d0af55f6111e9bcaf98ad60461fc Co-authored-by: glepnir <glephunter@gmail.com>
* | test(plugin/shada_spec): failure if timezone isn't a whole hour ahead of UTC ↵tstsrt2025-04-04
| | | | | | | | | | | | | | | | | | (#33257) Problem: When running functional tests locally, test `syntax/shada.vim works` fails if the local timezone is not a whole number of hours ahead of UTC. Solution: Use '!%M' for minute format so that UTC is used in the expected timestamp instead of the local timezone, just like '%H' for hours.
* | test(lua/hl_spec): fix hang on exit with ASAN (#33298)zeertzjq2025-04-04
| |
* | feat(vim.hl): allow multiple timed highlights simultaneously #33283Siddhant Agarwal2025-04-03
| | | | | | | | | | | | | | | | | | Problem: Currently vim.hl.range only allows one timed highlight. Creating another one, removes the old one. Solution: vim.hl.range now returns a timer and a function. The timer keeps track of how much time is left in the highlight and the function allows you to clear it, letting the user decide what to do with old highlights.
* | test(lua/secure_spec): fix failure with long path (#33280)zeertzjq2025-04-03
| | | | | | Ref #33278
* | vim-patch:9.1.1268: filetype: dax files are not recognizedChristian Clason2025-04-03
|/ | | | | | | | | | | | | | | | | | | | | Problem: filetype: dax files are not recognized Solution: detect "*.dax" as dax filetype, include dax filetype and syntax plugin (Anarion Dunedain) Data Analysis Expressions (DAX) is a formula expression language used in Analysis Services, Power BI, and Power Pivot in Excel. DAX formulas include functions, operators, and values to perform advanced calculations and queries on data in related tables and columns in tabular data models. DAX language overview: - https://learn.microsoft.com/en-us/dax/dax-overview closes: vim/vim#17035 https://github.com/vim/vim/commit/7f518e044fbc60cffdf2c0f611cc8c4dc35c338c Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
* fix(highlight): no match highlight during :substitute prompt #33262luukvbaal2025-04-02
| | | | | | Problem: Redrawing during a substitute confirm prompt causes the match highlight to disappear. Solution: Unset `highlight_match` after the prompt has returned. Use global highlight definitions in searchhl_spec.lua.
* fix(api): nvim_set_keymap() throws error even in pcall() #33228tstsrt2025-04-01
| | | | | | | | Problem: When `nvim_set_keymap` tries to overwrite a `<unique>` mapping, it throws an error even when called in `pcall`. Solution: src/nvim/mapping.c:buf_do_map no longer calls `semsg`. Its callers now decide whether to ignore the error, or use `semsg` (not caught)/`api_set_error` (caught by `pcall`).
* fix(window): crash on negative window height with 'winbar' #33250luukvbaal2025-04-01
| | | | Problem: Negative window and grid height with 'winbar'. Solution: Clamp the height when subtracting the 'winbar' height.
* fix(display): wrong cursor column with 'concealcursor' = "n" and virt_text ↵luukvbaal2025-04-01
| | | | | | | (#33218) Problem: Inline virtual text placed in a decor provider callback invalidates `w_virtcol`, which must be valid for `win_line()`. Solution: Call `validate_virtcol()` after "line" decor provider callbacks.
* fix(move): adjust for concealed lines above topline after scrolling up (#33211)luukvbaal2025-04-01
| | | | | | Problem: Scrolling up does not adjust `w_topline` for concealed lines directly above it, resulting in (non-visual) asymmetry when scrolling up/down. Solution: Adjust `w_topline` for concealed lines after scrolling up.
* vim-patch:9.1.1265: tests: no tests for typing normal char during completion ↵zeertzjq2025-04-01
| | | | | | | | | | | | | | (#33239) Problem: tests: no tests for typing normal char during completion Solution: add a test verifying the default behaviour (see :h popupmenu-completion) related: vim/vim#17019 https://github.com/vim/vim/commit/71f17fdd5f7bb05d78876b4db297824054377363 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Girish Palya <girishji@gmail.com>
* fix(lsp): better handling of "*" configsLewis Russell2025-03-31
| | | | | | | | | | | | | | | Problem: If a config name contains "*" it causes rtp discovery of `lsp/` to consider the `*` as a wildcard and could lead to strange and unintended behaviour. For example, accessing the `'*'` config from a `lsp/` file would cause an infinite loop. Solution: - Explicitly disallow a config name from containing wildcards, with the exception of `'*'`. - When Resolving `'*'` config, skip the rtp step.
* test(float): restore border tests (#33222)zeertzjq2025-03-31
|
* feat(float): 'winborder' "bold" style #33189glepnir2025-03-31
|
* feat(editor): 'autowriteall' on SIGHUP/SIGQUIT #32843Skoh2025-03-31
| | | | | | | | | | | Problem: Upon receiving a deadly signal, Nvim doesn't write buffers even if the option 'autowriteall' is set. Solution: Write to all writable buffers upon SIGHUP or SIGQUIT (but not SIGTERM), if the option 'autowriteall' is set. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* Merge pull request #32440 from fredizzimo/message-attachbfredl2025-03-31
|\ | | | | fix(ui): send multigrid message position and size when the UI is refreshed
| * fix(ui): send multigrid message position and size when the UI is refreshedFred Sundvik2025-03-27
| |
* | feat(lsp): workspace_required #31824Michael Strobel2025-03-30
| | | | | | | | | | | | | | | | | | | | Problem: Some language servers do not work properly without a workspace folder. Solution: Add `workspace_required`, which skips starting the lsp client if no workspace folder is found. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | fix(vim.lsp.inlay_hint): requesting inlay_hints even when disabled #32999Bartłomiej Maryńczak2025-03-30
| | | | | | | | | | | | | | | | Problem: Nvim needlessly requests inlay_hints even if they are disabled for a given buffer. Solution: Add the missing `enabled` check in `on_refresh`. Rest of the code has this check already so that's the only needed one to fix this.
* | vim-patch:9.1.1261: No test for 'pummaxwidth' non-truncated items (#33193)zeertzjq2025-03-30
| | | | | | | | | | | | | | | | Problem: No test for 'pummaxwidth' non-truncated items (after v9.1.1250) Solution: Add shorter items to Test_pum_maxwidth_multibyte() (zeertzjq). closes: vim/vim#17007 https://github.com/vim/vim/commit/c6336acfe3e80904458d7ea735929b4c91346702
* | vim-patch:9.1.1260: Hang when filtering buffer with NUL bytes (#33192)zeertzjq2025-03-30
| | | | | | | | | | | | | | | | | | Problem: Hang when filtering buffer with NUL bytes (after 9.1.1050). Solution: Don't subtract "written" from "lplen" repeatedly (zeertzjq). related: neovim/neovim#33173 closes: vim/vim#17011 https://github.com/vim/vim/commit/53fed23cb7bd59d9400961b44c6c8dca0029c929
* | feat(checkhealth): emoji for OK/WARN/ERROR #33172Justin M. Keyes2025-03-30
| | | | | | | | | | | | | | Problem: Health status can be much more visually distinct. Solution: Use emoji next to each status.
* | fix(api): use E226 instead of E227 for duplicate abbreviation (#33159)zeertzjq2025-03-30
| |
* | Merge pull request #33114 from zeertzjq/vim-9.1.1250zeertzjq2025-03-29
|\ \ | | | | | | vim-patch:9.1.{1250,1255,1257}: 'pummaxwidth'
| * | fix(pum): simplify 'pummaxwidth' truncation and avoid crashzeertzjq2025-03-29
| | |
| * | vim-patch:9.1.1255: missing test condition for 'pummaxwidth' settingzeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: missing test condition for 'pummaxwidth' setting, pummaxwidth not effective when width is 32 and height is 10 (after v9.1.1250) Solution: add missing comparison condition in pum_width() (glepnir) closes: vim/vim#16999 https://github.com/vim/vim/commit/532c5aec6fa8f0a3d743c7d1573d25d75dd36d5f Co-authored-by: glepnir <glephunter@gmail.com>
| * | vim-patch:9.1.1250: cannot set the maximum popup menu widthzeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot set the maximum popup menu width (Lucas Mior) Solution: add the new global option value 'pummaxwidth' (glepnir) fixes: vim/vim#10901 closes: vim/vim#16943 https://github.com/vim/vim/commit/88d75934c3d5bc4c406343f106e1a61638abd3a7 Co-authored-by: glepnir <glephunter@gmail.com>
* | | fix(api): use original LHS in keymap error message #33135Gregory Anders2025-03-29
|/ / | | | | | | | | | | | | | | | | | | | | | | When setting a keymap with "unique" that already exists the error message contains the LHS of the keymap with termcodes replaced. In particular this means that keys like <Tab> show as an actual tab character, meaning the error message displays as "Mapping already exists for ", which is hard to debug for users. Instead, display the original LHS (without any simplification or parsed termcodes). This rperesents exactly what the user passed to the `lhs` argument of `nvim_set_keymap`, which makes it easier to find where the offending keymap is.
* | vim-patch:9.1.1258: regexp: max \U and \%U value is limited by INT_MAX (#33156)zeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: regexp: max \U and \%U value is limited by INT_MAX but gives a confusing error message (related: v8.1.0985). Solution: give a better error message when the value reaches INT_MAX When searching Vim allows to get up to 8 hex characters using the /\V and /\%V regex atoms. However, when using "/\UFFFFFFFF" the code point is already above what an integer variable can hold, which is 2,147,483,647. Since patch v8.1.0985, Vim already limited the max codepoint to INT_MAX (otherwise it caused a crash in the nfa regex engine), but instead of error'ing out it silently fell back to parse the number as a backslash value and not as a codepoint value and as such this "/[\UFFFFFFFF]" will happily find a "\" or an literal "F". And this "/[\d127-\UFFFFFFFF]" will error out as "reverse range in character class). Interestingly, the max Unicode codepoint value is U+10FFFF which still fits into an ordinary integer value, which means, that we don't even need to parse 8 hex characters, but 6 should have been enough. However, let's not limit Vim to search for only max 6 hex characters (which would be a backward incompatible change), but instead allow all 8 characters and only if the codepoint reaches INT_MAX, give a more precise error message (about what the max unicode codepoint value is). This allows to search for "[\U7FFFFFFE]" (will likely return "E486 Pattern not found") and "[/\U7FFFFFF]" now errors "E1517: Value too large, max Unicode codepoint is U+10FFFF". While this change is straight forward on architectures where long is 8 bytes, this is not so simple on Windows or 32bit architectures where long is 4 bytes (and therefore the test fails there). To account for that, let's make use of the vimlong_T number type and make a few corresponding changes in the regex engine code and cast the value to the expected data type. This however may not work correctly on systems that doesn't have the long long datatype (e.g. OpenVMS) and probably the test will fail there. fixes: vim/vim#16949 closes: vim/vim#16994 https://github.com/vim/vim/commit/f2b16986a194ab839c5a23bd7fe904f9fae1526f Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(pum): fix heap-buffer-overflow with 'rightleft' (#33146)zeertzjq2025-03-29
| |
* | vim-patch:9.1.1252: typos in code and docs related to 'diffopt' "inline:" ↵zeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | (#33143) Problem: Typos in code and docs related to 'diffopt' "inline:". (after v9.1.1243) Solution: Fix typos and slightly improve the docs. (zeertzjq) closes: vim/vim#16997 https://github.com/vim/vim/commit/5a307c361cbe9f7ac438a917b905378d87f8f2de
* | fix(cmdline): avoid empty @: register after :<CR> (#33126)luukvbaal2025-03-28
| | | | | | Fix https://github.com/neovim/neovim/issues/33125
* | fix(cmdline): empty ext_cmdline block events for :<CR> #33118luukvbaal2025-03-28
| | | | | | | | | | Problem: An ext_cmdline block event that should be empty after :<CR> re-emits the previous cmdline. Solution: Clear `last_cmdline` even when `new_last_cmdline == NULL`.
* | refactor(treesitter): simplify injection retrieval #33104Riley Bruins2025-03-28
| | | | | | | | | | | | | | Simplify the logic for retrieving the injection ranges for the language tree. The trees are now also sorted by starting position, regardless of whether they are part of a combined injection or not. This would be helpful if ranges are ever to be stored in an interval tree or other kind of sorted tree structure.
* | fix(mouse): crash with click on win-separator in statusline (#33091)Shadman2025-03-28
| | | | | | | | | | | | | | Problem: Clicking on window separator in statusline crashes Nvim due to out of bound memory access Solution: Check if the click location is within clicking range before applying it.