aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* docs: misc (#30177)dundargoc2024-09-29
| | | | | Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Riley Bruins <ribru17@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:9.1.0745: filetype: bun and deno history files not recognizedChristian Clason2024-09-29
| | | | | | | | | | | | Problem: filetype: bun and deno history files not recognized Solution: detect '.bun_repl_history' and 'deno_history.txt' as javascript filetype (Wu, Zhenyu) closes: vim/vim#15761 https://github.com/vim/vim/commit/8a2aea8a623ba183dc0703a47970463b105a9399 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:9.1.0746: tests: Test_halfpage_longline() fails on large terminals ↵zeertzjq2024-09-29
| | | | | | | | | | | | (#30567) Problem: Test_halfpage_longline() fails on large terminals (lazypingu) Solution: Use a window with known width (zeertzjq). fixes: vim/vim#15755 closes: vim/vim#15756 https://github.com/vim/vim/commit/fa117387eea97306e4c59043b607ccb1533f64ea
* refactor(multibyte): neo-casefolding without allocationbfredl2024-09-29
| | | | fixes #30400
* fix(column): set signcolumn width after splitting window (#30556)zeertzjq2024-09-28
|
* fix(window): making float with title/footer non-float leaks memory (#30551)zeertzjq2024-09-28
|
* fix(treesitter): suppress get_parser warnings via opts.errorRiley Bruins2024-09-28
|
* fix(window): respect hide flag of float windows when switching (#30507)glepnir2024-09-28
|
* feat(defaults): pretty :help headings #30544Justin M. Keyes2024-09-27
| | | | | | | | | | | | | | Problem: Headings in :help do not stand out visually. Solution: Define a non-standard `@markup.heading.1.delimiter` group and special-case it in `highlight_group.c`. FUTURE: This is a cheap workaround until we have #25718 which will enable: - fully driven by `vimdoc/highlights.scm` instead of using highlight tricks (`guibg=bg guifg=bg guisp=fg`) - better support of "cterm" ('notermguicolors')
* fix(api): fix crash/leak with float title/footer on error (#30543)zeertzjq2024-09-27
|
* test(api/window_spec): remove duplicate test (#30538)zeertzjq2024-09-27
|
* vim-patch:9.1.0744: filetype: notmuch configs are not recognised (#30535)zeertzjq2024-09-27
| | | | | | | | | | | | | | Problem: filetype: notmuch configs are not recognised Solution: Detect more notmuch profile configuration files as dosini filetype (Julio B) Reference: https://notmuchmail.org/doc/latest/man1/notmuch-config.html#configuration closes: vim/vim#15744 https://github.com/vim/vim/commit/1a2870b57aa832500d59c17c8225a64c2b4aa619 Co-authored-by: Julio B <julio.bacel@gmail.com>
* vim-patch:9.1.0743: diff mode does not handle overlapping diffs correctly ↵zeertzjq2024-09-27
| | | | | | | | | | | | | | | | (#30532) Problem: diff mode does not handle overlapping diffs correctly Solution: correct the logic to handle overlapping blocks (Yukihiro Nakadaira) Vim merges overlapped diff blocks and it doesn't work expectedly in some situation. closes: vim/vim#15735 https://github.com/vim/vim/commit/06fe70c183a53ea97cd42ace490d4fb9fd14f042 Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
* fix(mbyte): check for utf8proc_map() failure (#30531)zeertzjq2024-09-26
|
* feat(health): highlight headings #30525Justin M. Keyes2024-09-26
| | | | | | | | | | Problem: checkhealth report sections are not visually separated. Solution: Highlight with "reverse". TODO: migrate checkhealth filetype to use treesitter. TODO: default :help should also highlight headings more boldy!
* vim-patch:9.1.0742: getcmdprompt() implementation can be improvedzeertzjq2024-09-26
| | | | | | | | | | | Problem: getcmdprompt() implementation can be improved Solution: Improve and simplify it (h-east) closes: vim/vim#15743 https://github.com/vim/vim/commit/25876a6cdd439054d0b3f920ccca0a435481de15 Co-authored-by: h-east <h.east.727@gmail.com>
* vim-patch:9.1.0741: No way to get prompt for input()/confirm()zeertzjq2024-09-26
| | | | | | | | | | | | Problem: No way to get prompt for input()/confirm() Solution: add getcmdprompt() function (Shougo Matsushita) (Shougo Matsushita) closes: vim/vim#15667 https://github.com/vim/vim/commit/6908428560a0d6ae27bf7af6fcb6dc362e31926c Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* test(api/buffer_updates_spec): prevent flakiness (#30521)zeertzjq2024-09-26
| | | Use poke_eventloop() to wait for Nvim to finish processing input.
* fix(channel): handle writing to file instead of pipe (#30519)zeertzjq2024-09-26
|
* perf(treesitter): use `child_containing_descendant()` in `is_ancestor()`Riley Bruins2024-09-25
| | | | | | | | **Problem:** `is_ancestor()` uses a slow, bottom-up parent lookup which has performance pitfalls detailed in #28512. **Solution:** Take `is_ancestor()` from $O(n^2)$ to $O(n)$ by incorporating the use of the `child_containing_descendant()` function
* refactor(lua): vim.keymap.set tests, docs #30511Justin M. Keyes2024-09-25
|
* fix(paste): only record a paste when it's from RPC (#30491)zeertzjq2024-09-24
| | | | | | | | | Problem: When using nvim_paste in a mapping during a macro recording, both the mapping and the paste are recorded, causing the paste to be performed twice when replaying the macro. Solution: Only record a paste when it is from RPC. Unfortunately this means there is no way for a script to make a recorded paste. A way to enable that can be discussed later if there is need.
* feat(paste): unify cancel and error behavior (#30476)zeertzjq2024-09-24
| | | | | | | | | | | | | | | | | | | | | | | | Before this PR, the behavior of nvim_paste is: - When vim.paste() returns false, return false to the client, but treat following chunks normally (i.e. rely on the client cancelling the paste as expected). - When vim.paste() throws an error, still return true to the client, but drain the following chunks in the stream without calling vim.paste(). There are two problems with such behavior: - When vim.paste() errors, the client is still supposed to send the remaining chunks of the stream, even though they do nothing. - Having different code paths for two uncommon but similar situations complicates maintenance. This PR makes both the cancel case and the error case return false to the client and drain the remaining chunks of the stream, which, apart from sharing the same code path, is beneficial whether the client checks the return value of nvim_paste or not: - If the client checks the return value, it can avoid sending the following chunks needlessly after an error. - If the client doesn't check the return value, chunks following a cancelled chunk won't be pasted on the server regardless, which leads to less confusing behavior.
* Merge #30435 refactor: rename "Dictionary" => "Dict"Justin M. Keyes2024-09-23
|\
| * refactor(api): rename Dictionary => DictJustin M. Keyes2024-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not a breaking change.
| * refactor(api)!: rename Dictionary => DictJustin M. Keyes2024-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change.
* | fix(vim.fs): dirname() returns "." on mingw/msys2 #30480Justin M. Keyes2024-09-23
|/ | | | | | | | | | Problem: `vim.fs.dirname([[C:\User\XXX\AppData\Local]])` returns "." on mingw/msys2. Solution: - Check for "mingw" when deciding `iswin`. - Use `has("win32")` where possible, it works in "fast" contexts since b02eeb6a7281df0561a021d7ae595c84be9a01be.
* test(tui_spec): prevent another case of race between paste and input (#30481)zeertzjq2024-09-23
| | | | | Problem: When input immediately follows end of bracketed paste, the nvim_input may be processed before the nvim_paste. Solution: Ensure some waiting after the end of a bracketed paste.
* vim-patch:9.1.0740: incorrect internal diff with empty file (#30471)zeertzjq2024-09-23
| | | | | | | | | | | | | | Problem: incorrect internal diff with an empty file Solution: Set pointer to NULL, instead of using an empty line file (Yukihiro Nakadaira) When using internal diff, empty file is read as one empty line file. So result differs from external diff. closes: vim/vim#15719 https://github.com/vim/vim/commit/f1694b439bb175d956b49da620f1253462ec507b Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
* feat(fs.lua): add vim.fs.rm()Lewis Russell2024-09-22
| | | | Analogous to the shell `rm` command.
* docs(api): nvim_get_runtime_file preserves 'runtimepath' order #30454Evgeni Chasnovski2024-09-22
|
* fix(paste): improve repeating of pasted text (#30438)zeertzjq2024-09-22
| | | | | | | - Fixes 'autoindent' being applied during redo. - Makes redoing a large paste significantly faster. - Stores pasted text in the register being recorded. Fix #28561
* test(terminal): unskip wrap tests on windowsChristian Clason2024-09-21
| | | | These should have been unskipped again when reflow was reenabled.
* test: support upvalues in exec_luaLewis Russell2024-09-21
|
* vim-patch:9.1.0738: filetype: rapid files are not recognizedzeertzjq2024-09-21
| | | | | | | | | | | | Problem: filetype: rapid files are not recognized Solution: detect '*.sysx' and '*.modx' as rapid filetype (KnoP-01) closes: vim/vim#15669 https://github.com/vim/vim/commit/fdcb08264d6e8525a07b29c14863adc6ead83913 Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
* vim-patch:35699f1: runtime(vim): Update base-syntax, improve folding ↵zeertzjq2024-09-20
| | | | | | | | | | | | | | | function matches (#30427) - Allow function command modifiers. - Match function bodies starting with empty lines. Command modifiers reported by @Konfekt. fixes vim/vim#15671 closes: vim/vim#15674 https://github.com/vim/vim/commit/35699f17497dcdcfdd747fedaef28f208ac6eb5f Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* refactor!: rename 'jumpoptions' flag "unload" to "clean" (#30418)zeertzjq2024-09-19
| | | Follow-up to #29347
* feat(tui): builtin UI (TUI) sets client info #30397Justin M. Keyes2024-09-18
| | | | | | | | | | | | Problem: The default builtin UI client does not declare its client info. This reduces discoverability and makes it difficult for plugins to identify the UI. Solution: - Call nvim_set_client_info after attaching, as recommended by `:help dev-ui`. - Also set the "pid" field. - Also change `ui_active()` to return a count. Not directly relevant to this commit, but will be useful later.
* vim-patch:9.1.0735: filetype: salt files are not recognizedGregory Anders2024-09-17
| | | | | | | | | | | | Problem: filetype: salt files are not recognized Solution: Detect '*.sls' files as filetype salt, include a syntax script (Gregory Anders) closes: vim/vim#15689 https://github.com/vim/vim/commit/89b9bb4ac8ceb701ebecb8c02aca3d047dff9991 Co-authored-by: Gregory Anders <greg@gpanders.com>
* vim-patch:9.1.0734: filetype: jinja files are not recognizedGregory Anders2024-09-17
| | | | | | | | | | | | Problem: filetype: jinja files are not recognized Solution: detect '*.jinja' files a jinja filetype, include jinja syntax script (Gregory Anders) related: vim/vim#15689 https://github.com/vim/vim/commit/202c467bb37b894ada6377d3f2621c103f324757 Co-authored-by: Gregory Anders <greg@gpanders.com>
* test(vim.ui.open): opt.cmdJustin M. Keyes2024-09-16
|
* vim-patch:9.1.0731: inconsistent case sensitive extension matchingChristian Clason2024-09-16
| | | | | | | | | | | | | | | | | | | | | Problem: inconsistent case sensitive extension matching Solution: unify case sensitive extension matching (Evgeni Chasnovski). There are different approaches of how extensions are matched with respect to case sensitivity. In particular, '\c' flag is used in pattern whereas in most places case sensitive matching is guarded behind `has("fname_case")` condition. Replace all instances of '\c' with an explicit case sensitive pattern variants guarded by `has("fname_case")`. Strictly speaking, this is a breaking change because only two (most common and prevailingly tested) variants are now matched: upper first letter and upper all letters. closes: vim/vim#15672 https://github.com/vim/vim/commit/59b089c9df238ce940b3c593295bc511e201399a Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
* refactor: rename "process" => "proc" #30387Justin M. Keyes2024-09-15
| | | | | | | | | | | | Problem: - "process" is often used as a verb (`multiqueue_process_events`), which is ambiguous for cases where it's used as a topic. - The documented naming convention for processes is "proc". - `:help dev-name-common` - Shorter is better, when it doesn't harm readability or discoverability. Solution: Rename "process" => "proc" in all C symbols and module names.
* refactor(tests): rename terminal/testutil.lua => testterm.lua #30372Justin M. Keyes2024-09-15
| | | | | This module is generally used by any tests that need the full Nvim TUI instead of `screen.lua`. Thus it should live in `functional/` instead of in `functional/terminal/`.
* Merge pull request #30378 from zeertzjq/vim-9.1.0729zeertzjq2024-09-14
|\ | | | | vim-patch:9.1.{0729,0730}
| * vim-patch:9.1.0730: Crash with cursor-screenline and narrow windowzeertzjq2024-09-14
| | | | | | | | | | | | | | | | | | | | | | Problem: Crash with cursor-screenline and narrow window (elig0n) Solution: Don't set right_col when width2 is 0 (zeertzjq). fixes: vim/vim#15677 closes: vim/vim#15678 https://github.com/vim/vim/commit/59149f02692804267e7cc0665d0334f6ff4675be
| * vim-patch:9.1.0729: Wrong cursor-screenline when resizing windowzeertzjq2024-09-14
| | | | | | | | | | | | | | | | | | | | Problem: Wrong cursor-screenline when resizing window Solution: Invalidate saved left_col and right_col when width1 or width2 change. closes: vim/vim#15679 https://github.com/vim/vim/commit/86dc4f8b432233a01d022c3e71df53db58229713
* | vim-patch:9.1.0728: [security]: heap-use-after-free in garbage collection ↵zeertzjq2024-09-14
|/ | | | | | | | | | | | | with location list user data (#30377) Problem: heap-use-after-free in garbage collection with location list user data. Solution: Mark user data as in use when no other window is referencing the location list (zeertzjq) fixes: neovim/neovim#30371 closes: vim/vim#15683 https://github.com/vim/vim/commit/be4bd189d23854ddf1d85ad291d8f7ad3f22b7a0
* feat(treesitter): start moving get_parser to return nil #30313Riley Bruins2024-09-13
| | | | | | | | | | | | | | | | | | | **Problem:** `vim.treesitter.get_parser` will throw an error if no parser can be found. - This means the caller is responsible for wrapping it in a `pcall`, which is easy to forget - It also makes it slightly harder to potentially memoize `get_parser` in the future - It's a bit unintuitive since many other `get_*` style functions conventionally return `nil` if no object is found (e.g. `get_node`, `get_lang`, `query.get`, etc.) **Solution:** Return `nil` if no parser can be found or created - This requires a function signature change, and some new assertions in places where the parser will always (or should always) be found. - This commit starts by making this change internally, since it is breaking. Eventually it will be rolled out to the public API.
* vim-patch:9.1.0725: filetype: swiftinterface files are not recognized (#30350)zeertzjq2024-09-12
| | | | | | | | | | | Problem: filetype: swiftinterface files are not recognized Solution: Detect '*.swiftinterface' files as swift filetype (LosFarmosCTL) closes: vim/vim#15658 https://github.com/vim/vim/commit/03cac4b70d819148f4b4404701b8f331a3af0fb6 Co-authored-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com>