aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* vim-patch:9.0.1856: issues with formatting positional arguments (#25013)zeertzjq2023-09-04
| | | | | | | | | | | | | Problem: issues with formatting positional arguments Solution: fix them, add tests and documentation closes: vim/vim#12140 closes: vim/vim#12985 Tentatively fix message_test. Check NULL ptr. https://github.com/vim/vim/commit/aa90d4f031f73a34aaef5746931ea746849a2231 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
* vim-patch:9.0.1848: [security] buffer-overflow in vim_regsub_both() (#25001)zeertzjq2023-09-03
| | | | | | | | | | | | | | | | | Problem: buffer-overflow in vim_regsub_both() Solution: Check remaining space https://github.com/vim/vim/commit/ced2c7394aafdc90fb7845e09b3a3fee23d48cb1 The change to do_sub() looks confusing. Maybe it's an overflow check? Then the crash may not be applicable to Nvim because of different casts. The test also looks confusing. It seems to source itself recursively. Also don't call strlen() twice on evaluation result. N/A patches for version.c: vim-patch:9.0.1849: CI error on different signedness in ex_cmds.c vim-patch:9.0.1853: CI error on different signedness in regexp.c Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.1840: [security] use-after-free in do_ecmd (#24993)zeertzjq2023-09-03
| | | | | | | | | | | Problem: use-after-free in do_ecmd Solution: Verify oldwin pointer after reset_VIsual() https://github.com/vim/vim/commit/e1dc9a627536304bc4f738c21e909ad9fcf3974c N/A patches for version.c: vim-patch:9.0.1841: style: trailing whitespace in ex_cmds.c Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(shada): update marks when using delmarks! (#24978)Maria José Solano2023-09-03
|
* vim-patch:9.0.1846: [security] crash in fullcommandzeertzjq2023-09-03
| | | | | | | | | Problem: crash in fullcommand Solution: Check for typeval correctly https://github.com/vim/vim/commit/4c6fe2e2ea62469642ed1d80b16d39e616b25cf5 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.1852: i_CTRL-O does not reset Select Mode (#24990)zeertzjq2023-09-03
| | | | | | | | | | | | Problem: i_CTRL-O does not reset Select Mode Solution: Reset select mode on CTRL-O in insert mode closes: vim/vim#13001 closes: vim/vim#12115 https://github.com/vim/vim/commit/d69aecf141ff05a645d02f39f1cbf6381ed7d0c0 Co-authored-by: pierreganty <pierreganty@gmail.com> Co-authored-by: Christian Brabandt <cb@256bit.org>
* build: download busted from own neovim/deps repositorydundargoc2023-09-03
| | | | | | | | Downloading the necessary files all at once instead of doing dependency handling with luarocks speeds up installation immensely. We speed up the process even more by using luv as a replacement for the C modules in the busted dependencies, which allows us to skip costly compilation times. Co-authored-by: bfredl <bjorn.linse@gmail.com>
* fix(ui): avoid ambiguity about chunk that clears part of line (#24982)zeertzjq2023-09-02
| | | Co-authored-by: bfredl <bjorn.linse@gmail.com>
* test(shada/marks_spec): load the file with the marks (#24979)zeertzjq2023-09-02
|
* vim-patch:9.0.1828: cursor wrong with virt text before double-width char ↵zeertzjq2023-09-01
| | | | | | | | | | | (#24967) Problem: Wrong cursor position with virtual text before double-width char at window edge. Solution: Check for double-width char before adding virtual text size. closes: vim/vim#12977 https://github.com/vim/vim/commit/ac2d8815ae7a93c54b07cba76475cfb3f26a3ac6
* fix(query_error): multiline bugLewis Russell2023-08-31
|
* feat(treesitter): improve query error messageAmaan Qureshi2023-08-31
|
* fix(lsp): only disable inlay hints / diagnostics if no other clients are ↵Chris AtLee2023-08-31
| | | | | | | | | | | | | | | | | | | connected (#24535) This fixes the issue where the LspNotify handlers for inlay_hint / diagnostics would end up refreshing all attached clients. The handler would call util._refresh, which called vim.lsp.buf_request, which calls the method on all attached clients. Now util._refresh takes an optional client_id parameter, which is used to specify a specific client to update. This commit also fixes util._refresh's handling of the `only_visible` flag. Previously if `only_visible` was false, two requests would be made to the server: one for the visible region, and one for the entire file. Co-authored-by: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
* fix(shada): update deleted marks (#24936)Maria José Solano2023-08-31
| | | | | | Fix #4295 Close #16067 Co-authored-by: chentau <tchen1998@gmail.com>
* vim-patch:9.0.1825: wrong cursor position with virt text and 'linebreak' ↵zeertzjq2023-08-31
| | | | | | | | | | | | | | | (#24957) Problem: Wrong cursor position with virtual text before a whitespace character and 'linebreak'. Solution: Always set "col_adj" to "size - 1" and apply 'linebreak' after adding the size of 'breakindent' and 'showbreak'. closes: vim/vim#12956 https://github.com/vim/vim/commit/6e55e85f92aff43c1b3cb564201440f3552d63f0 N/A patches: vim-patch:9.0.1826: keytrans() doesn't translate recorded key typed in a GUI
* vim-patch:9.0.1820: Rexx files may not be recognised (#24956)zeertzjq2023-08-31
| | | | | | | | | | | Problem: Rexx files may not be recognised Solution: Add shebang detection and improve disambiguation of *.cls files closes: vim/vim#12951 https://github.com/vim/vim/commit/e06afb7860805537ccd69966bc03169852c9b378 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1797: Vimball/Visual Basic filetype detection conflict (#24947)zeertzjq2023-08-31
| | | | | | | | | | | | | Problem: Vimball/Visual Basic filetype detection conflict Solution: runtime(vb): Improve Vimball and Visual Basic detection logic Only run Vimball Archiver's BufEnter autocommand on Vimball archives. Fixes vim/vim#2694. closes: vim/vim#12899 https://github.com/vim/vim/commit/f97f6bbf56408c0c97b4ddbe81fba858d7455b0d Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1807: runtime: crystal scripts not recognised (#24949)zeertzjq2023-08-31
| | | | | | | | | | Problem: runtime: crystal scripts not recognised Solution: Filetype detect Crystal scripts by shebang line closes: vim/vim#12935 https://github.com/vim/vim/commit/9b73902dbe6f7940326bcd8dbc89d010d85d69c5 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1803: runtime(filetype): Add norg language detection (#24948)zeertzjq2023-08-31
| | | | | | | | | runtime(filetype): Add norg markup language detection closes: vim/vim#12913 https://github.com/vim/vim/commit/03e44a1d70e914504e6151fe88ad1e574cbf0a59 Co-authored-by: NTBBloodbath <bloodbathalchemist@protonmail.com>
* fix(api): nvim_buf_get_offset in a new buffer with zero or one linesbfredl2023-08-30
| | | | fixes #24930
* fix(treesitter): fix another TSNode:tree() double freebfredl2023-08-29
| | | | | | | Unfortunately the gc=false objects can refer to a dangling tree if the gc=true tree was freed first. This reuses the same tree object as the node itself is keeping alive via the uservalue of the node userdata. (wrapped in a table due to lua 5.1 restrictions)
* fix(treesitter): fix TSNode:tree() double free (#24796)nwounkn2023-08-29
| | | | | | | | | Problem: `push_tree`, every time its called for the same TSTree with `do_copy=false` argument, creates a new userdata for it. Each userdata, when garbage collected, frees the same TSTree C object. Solution: Add flag to userdata, which indicates, should C object, which userdata points to, be freed, when userdata is garbage collected.
* fix(api): better topline adjustments in nvim_buf_set_linesbfredl2023-08-29
| | | | | | | Some more reasonable defaults for topline: - if topline was replaced with another line, that now becomes topline - if line was inserted just before topline, display it. This is more similar to the previous API behavior.
* vim-patch:9.0.1813: linebreak incorrect drawn with breakindent (#24917)zeertzjq2023-08-29
| | | | | | | | | Problem: 'linebreak' is incorrectly drawn after 'breakindent'. Solution: Don't include 'breakindent' size when already after it. closes: vim/vim#12937 closes: vim/vim#12940 https://github.com/vim/vim/commit/1d3e0e8f3110a7807431eae056914ccea57b057b
* fix(api): handle clearing out last line of non-current bufferbfredl2023-08-28
| | | | fixes #24911
* vim-patch:9.0.1810: camel-case spelling has issues with digits (#24909)zeertzjq2023-08-28
| | | | | | | | | | | | | | | Problem: camel-case spelling has issues with digits Solution: Improve the camCase spell checking by taking digits and caps into account Rewrite the conditions to check for word boundaries by taking into account the presence of digits and all-caps sequences such as acronyms. closes: vim/vim#12644 closes: vim/vim#12933 https://github.com/vim/vim/commit/d08745040bb82c5e9a81b6c8a414e50951642492 Co-authored-by: LemonBoy <thatlemon@gmail.com>
* vim-patch:9.0.1798: The 'syntax' option has no completion. (#24908)zeertzjq2023-08-28
| | | | | | | | | | | | | Problem: The 'syntax' option has no completion. Solution: Add syntax option completion. closes: vim/vim#12900 https://github.com/vim/vim/commit/6dfdff3f273dcea29099d81e3eceb871ae089998 N/A patches: vim-patch:9.0.1795: Indentation issues Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1802: Multiline regex with Visual selection fails with virtual ↵zeertzjq2023-08-28
| | | | | | | | | | | | | text Problem: Multiline regex with Visual selection fails when Visual selection contains virtual text after last char. Solution: Only include virtual text after last char when getting full line length. closes: vim/vim#12908 https://github.com/vim/vim/commit/e3daa06be1a3ba7ced0735582467d092275e591c
* vim-patch:9.0.1800: Cursor position still wrong with 'showbreak' and virtual ↵zeertzjq2023-08-28
| | | | | | | | | | | | | | | | text Problem: Cursor position still wrong with 'showbreak' and virtual text after last character or 'listchars' "eol". Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also fix first char of virtual text not shown at the start of a screen line. closes: vim/vim#12478 closes: vim/vim#12532 closes: vim/vim#12904 https://github.com/vim/vim/commit/6a3897232aecd3e8b9e8b23955e55c1993e5baec
* fix(ui): wrong cursor position with left gravity inline virt text at eolzeertzjq2023-08-28
|
* fix(editorconfig): do not set 'endofline'Lewis Russell2023-08-27
| | | | | | | | | | | Problem: 'endofline' can be used to detect if a file ends of <EOL>, however editorconfig can break this. Solution: Set 'endofline' during BufWritePre Fixes: #24869
* vim-patch:9.0.1792: problem with gj/gk/gM and virtual text (#24898)zeertzjq2023-08-27
| | | | | | | | | Problem: Normal mode "gM", "gj", "gk" commands behave incorrectly with virtual text. Solution: Use linetabsize() instead of linetabsize_str(). closes: vim/vim#12909 https://github.com/vim/vim/commit/d809c0a90387a23aed21ba37d0b65332fb5dafe7
* fix(undo): fix crash caused by checking undolevels in wrong bufferbfredl2023-08-27
| | | | fixes #24894
* fix(api): fix inconsistent behavior of topline touched in recent refactorbfredl2023-08-27
| | | | | | | | | | | | | | | | The change in #24824 0081549 was not a regression, however it was an incomplete change. Unfortunately some common plugins come to depend on this exising self-inconsistent behavior. These plugins are going to need to update for 0.10 nvim_buf_set_lines used to NOT adjust the topline correctly if a buffer was displayed in just one window. However, if displayed in multiple windows, it was correctly adjusted for any window not deemed the current window for the buffer (which could be an arbitrary choice if the buffer was not already current, as noted in the last rafactor) This fixes so that all windows have their topline adjusted. The added tests show this behavior, which should be the reasonable one.
* feat(float): implement footerEvgeni Chasnovski2023-08-26
| | | | | | | | Problem: Now way to show text at the bottom part of floating window border (a.k.a. "footer"). Solution: Allows `footer` and `footer_pos` config fields similar to `title` and `title_pos`.
* fix(statuscolumn): force full redraw when signcolumn is invalid (#24859)luukvbaal2023-08-26
| | | Fix #24655
* fix(extmarks): wrong display when changing text with virt_lines (#24879)Ibby2023-08-26
|
* refactor(change): do API changes to buffer without curbuf switchbfredl2023-08-26
| | | | | | | | | | | | | | | | | | | | | | | Most of the messy things when changing a non-current buffer is not about the buffer, it is about windows. In particular, it is about `curwin`. When editing a non-current buffer which is displayed in some other window in the current tabpage, one such window will be "borrowed" as the curwin. But this means if two or more non-current windows displayed the buffers, one of them will be treated differenty. this is not desirable. In particular, with nvim_buf_set_text, cursor _column_ position was only corrected for one single window. Two new tests are added: the test with just one non-current window passes, but the one with two didn't. Two corresponding such tests were also added for nvim_buf_set_lines. This already worked correctly on master, but make sure this is well-tested for future refactors. Also, nvim_create_buf no longer invokes autocmds just because you happened to use `scratch=true`. No option value was changed, therefore OptionSet must not be fired.
* fix(ui): wrong display with 0-width inline virt_text at eol (#24854)zeertzjq2023-08-24
|
* feat(treesitter): add 'injection.self' and 'injection.parent'Amaan Qureshi2023-08-24
| | | | Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
* vim-patch:9.0.1785: wrong cursor position with 'showbreak' and lcs-eol (#24852)zeertzjq2023-08-24
| | | | | | | | | | Problem: wrong cursor position with 'showbreak' and lcs-eol Solution: Add size of 'showbreak' before when 'listchars' "eol" is used. Also fix wrong cursor position with wrapping virtual text on empty line and 'showbreak'. closes: vim/vim#12891 https://github.com/vim/vim/commit/1193951bebcff50d88403ce17dec5d3be14f131d
* vim-patch:9.0.1773: cannot distinguish Forth and Fortran *.f files (#24841)zeertzjq2023-08-23
| | | | | | | | | | | | | | | | Problem: cannot distinguish Forth and Fortran *.f files Solution: Add Filetype detection Code Also add *.4th as a Forth filetype closes: vim/vim#12251 https://github.com/vim/vim/commit/19a3bc3addf9b4aa8150a01b11b4249c67d15d3b Don't remove filetype files from Vim patches: - filetype.vim, script.vim, ft.vim usually contain useful changes - script.vim and ft.vim don't even have their paths spelled correctly Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1781: Problems when setting bin/paste optionzeertzjq2023-08-23
| | | | | | | | | | | | | | | | | | | | Problem: Problems when setting bin/paste option Solution: When setting binary/paste, remember that this also affects depending options, so that :verbose set returns the right location. Mention if depending options for 'binary' or 'paste' have been reset indirectly. Add a test to verify it works. Also noticed as small bug, that the global option value for expandtab was not reset when paste option is set, so fix that while at it. closes: vim/vim#12837 closes: vim/vim#12879 https://github.com/vim/vim/commit/757593c07a4f4ac43eb6c6e52fc299abc9bc08bc Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.1710: scrolloff options work slightly differentzeertzjq2023-08-23
| | | | | | | | | | | | | | | | | | | | | | | Problem: sidescrolloff and scrolloff options work slightly different than other global-local options Solution: Make it behave consistent for all global-local options It was noticed, that sidescrolloff and scrolloff options behave differently in comparison to other global-local window options like 'listchars' So make those two behave like other global-local options. Also add some extra documentation for a few special local-window options. Add a few tests to make sure all global-local window options behave similar closes: vim/vim#12956 closes: vim/vim#12643 https://github.com/vim/vim/commit/4a8eb6e7a9df10f79bf95301ced012f0d6a13088 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(plines): count 'showbreak' for virtual text at eolzeertzjq2023-08-23
|
* vim-patch:9.0.1783: Display issues with virt text smoothscroll and showbreakzeertzjq2023-08-23
| | | | | | | | | | | Problem: Wrong display with wrapping virtual text or unprintable chars, 'showbreak' and 'smoothscroll'. Solution: Don't skip cells taken by 'showbreak' in screen lines before "w_skipcol". Combined "n_skip" and "skip_cells". closes: vim/vim#12597 https://github.com/vim/vim/commit/b557f4898208105b674df605403cac1b1292707b
* vim-patch:9.0.1779: Need more state() tests (#24840)zeertzjq2023-08-23
| | | | | | | | | Problem: Need more state() tests Solution: Add a few more tests for operater pending mode and register yank command closes: vim/vim#12883 https://github.com/vim/vim/commit/8dabccd295271104ad5af0abc48e283d644cff59
* test: fix state() test flakiness (#24839)zeertzjq2023-08-23
|
* vim-patch:9.0.0579: using freed memory when 'tagfunc' wipes out buffer (#24838)zeertzjq2023-08-22
| | | | | | | | | | | Problem: Using freed memory when 'tagfunc' wipes out buffer that holds 'complete'. Solution: Make a copy of the option. Make sure cursor position is valid. https://github.com/vim/vim/commit/0ff01835a40f549c5c4a550502f62a2ac9ac447c Cherry-pick a cmdwin change from patch 9.0.0500. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test(old): reorder test_edit.vim to match upstream (#24837)zeertzjq2023-08-22
|