Commit Graph
17559 Commits
Author SHA1 Message Date
Jan Edmund Lazo 5b897acfc1 test/old: restore test_backspace_opt.vim
Porting it to test/functional/legacy/backspace_opt_spec.lua
was a mistake.
Tests pass after commenting out some lines for Vi compatibility.

File is copied from Vim as of patch v8.2.0540.
Patch v8.2.0540 cannot be fully ported yet.
This file is a prequisite for future v8.2.x patches.
2021-01-05 09:47:38 -05:00
Jan Edmund Lazo 4f53ebaceb vim-patch:8.2.0050: after deleting a file mark it is still in viminfo
Problem:    After deleting a file mark it is still in viminfo.
Solution:   When a file mark was deleted more recently than the mark in the
            merged viminfo file was updated, do not store the mark. (Pavol
            Juhas, closes vim/vim#5401, closes vim/vim#1339)
https://github.com/vim/vim/commit/8cd6cd8087ccf08e4303dbf5f732fc4b82b917e1

Neovim's ShaDa is incompatible with Vim's "viminfo"
so "viminfo" tests fail.

N/A patches for version.c:

vim-patch:8.1.1731: command line history not read from viminfo on startup

Problem:    Command line history not read from viminfo on startup.
Solution:   Get history length after initializing it.
https://github.com/vim/vim/commit/26b654a5df9414e43734eb4c956b67c331d70a50

vim-patch:8.1.1764: ":browse oldfiles" is not tested

Problem:    ":browse oldfiles" is not tested.
Solution:   Add a test.
https://github.com/vim/vim/commit/5328cb8986d2620f45b41acf28778f8ce2f8cac1

vim-patch:8.1.2111: viminfo file not sufficiently tested

Problem:    Viminfo file not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5009)
https://github.com/vim/vim/commit/2a8d3b8997d4fe94bc9c02ae04e873eab2f13b09

vim-patch:8.1.2126: viminfo not sufficiently tested

Problem:    Viminfo not sufficiently tested.
Solution:   Add more test cases.  Clean up comments. (Yegappan Lakshmanan,
            closes vim/vim#5032)
https://github.com/vim/vim/commit/6bd1d7706766a7899904163e8fd55ea117fb1953
2021-01-05 09:47:38 -05:00
chentau 6127661024 forgot to update tests 2021-01-05 00:39:07 -08:00
chentau 231f75e086 change gravity to be a boolean flag, and add corresponding flag for end position of extmark 2021-01-05 00:28:34 -08:00
Björn Linse adbf2dd86b Merge pull request #13687 from paddor/master
remove trailing tabs
2021-01-05 07:59:39 +01:00
erw7 eaab8e494d buffer.c: fix problem of memory allocation 2021-01-05 15:09:43 +09:00
Patrik Wenger 6d5626f355 remove trailing tabs 2021-01-04 20:10:34 +01:00
Björn Linse 9223d1450d Merge pull request #13590 from bfredl/tsquery
treesitter: simplify query reading logic
2021-01-04 16:17:34 +01:00
Björn Linse 5fcc247c6e Merge pull request #11906 from bfredl/moreblock
consider "-- more --" state to be blocking
2021-01-04 11:14:07 +01:00
Björn Linse 885c2f7281 treesitter: simplify query reading logic
Only the plugin/package manager should "manage" after/. Consumers of
nvim_get_runtime_file() should not need to special case it (if your plugin
manager is broken then fix it instead).

Don't use vim.fn.readfile(). Lua can already read files. It is even
better at it than vim script.

expose M.get_query_files(). Listing the queries is essential for user
config debug, and let plugins do fun things with it.
Abstraction-by-obscurity is not useful (plugins can just cargo cult copy
the code anyway, better with public entry points).
2021-01-04 11:06:02 +01:00
Björn Linse 4cdc8b1efd input: consider "-- more --" state to be blocking, fixes #11899 2021-01-04 09:41:25 +01:00
chentau 10b278bdae allow for extmark gravity to be set through api 2021-01-03 13:59:24 -08:00
Jan Edmund LazoandPeter Wolf a1ed941a78 vim-patch:8.2.0861: cannot easily get all the current marks (#13676)
Problem:    Cannot easily get all the current marks.
Solution:   Add getmarklist(). (Yegappan Lakshmanan, closes #6032)
https://github.com/vim/vim/commit/cfb4b47de08e4437c692d382067dc1692cd83c23

Cherry-pick the column number fix from patch v8.2.0871
because patch v8.2.0871 cannot be fully ported
without the method patches.

Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
2021-01-03 15:33:21 -05:00
Michael Lingelbach fff4facdc4 LSP: fix messageRequest to not return nested title (#13674)
* LSP: fix window/showMessageRequest to not return nested title

* Add window/showMessageRequest handler to docs
2021-01-03 20:31:09 +01:00
Thomas Vigouroux fd960a33e4 fix: check for valid buffer handles in modify_keymap (#13543)
Fixes #13541
Neovim would crash when trying to map a key on non existant buffer
2021-01-03 19:14:18 +01:00
Björn Linse ae63dc264a Merge pull request #13669 from bfredl/sortsplice
buffer updates: mark sorted region as changed.
2021-01-03 18:28:21 +01:00
Björn Linse a58d96a7ed buffer updates: mark sorted region as changed.
NB: currently this invalidates all extmarks inside the region.
Later on within-line extmarks could be preserved
2021-01-03 14:47:37 +01:00
Björn Linse adb01190c4 tests: make treesitter its own category 2021-01-03 14:47:29 +01:00
Matthieu Coudron 7a81a0c073 Merge pull request #13665 from janlazo/vim-8.2.0917
vim-patch:8.1.{1667,1672,1822},8.2.{407,917}
2021-01-03 10:10:10 +01:00
Collided Scope 84d08358b7 ci: Fix typo in release.yml that prevents optimized nightly build (#13671)
Assuming the `CMAKE_BUILD_TYPE` directive is case-sensitive, this *actually* prevents the nightly build from being optimized. Even if it doesn't, the typo causes `:checkhealth` to issue a dummy warning in the Performance section.
2021-01-03 02:19:03 +01:00
Jan Edmund Lazo ebcdcad0b7 Merge pull request #13670 from janlazo/vim-8.2.2274
vim-patch:8.2.{456,458,461,470,2274,2277}
2021-01-02 20:18:18 -05:00
Jan Edmund Lazo c3931495b2 vim-patch:8.2.0470: Test_confirm_cmd_cancel() can fail on a slow system
Problem:    Test_confirm_cmd_cancel() can fail on a slow system.
Solution:   Use WaitForAssert(). (Ozaki Kiichi, closes vim/vim#5861)
https://github.com/vim/vim/commit/7b1b36b1cb744e87adfbef88b7ce26c863b0594a
2021-01-02 18:49:25 -05:00
Jan Edmund Lazo 30e8c1779f vim-patch:8.2.0461: confirm test fails on amd64 system
Problem:    Confirm test fails on amd64 system. (Alimar Riesebieter)
Solution:   Add an extra WaitForAssert(). (Dominique Pelle)
https://github.com/vim/vim/commit/9207d1f523c2e2fb1c8749ec6f84ab5ecc2c62f4
2021-01-02 18:48:31 -05:00
Jan Edmund Lazo d216314e5b vim-patch:8.2.0458: missing feature check in test function
Problem:    Missing feature check in test function.
Solution:   Add check commands.
https://github.com/vim/vim/commit/bea9023d4260349c130faf447aa8d4cbadeffab2
2021-01-02 18:47:06 -05:00
Jan Edmund Lazo df40d973cc vim-patch:8.2.0456: Test_confirm_cmd is flaky
Problem:    Test_confirm_cmd is flaky.
Solution:   Add a term_wait() call. (closes vim/vim#5854)
https://github.com/vim/vim/commit/72749f062f15c7147f512bc581695c25ad78fb4e

Cherry-pick Test_confirm_cmd() from patch v8.2.0203
because that patch modifies multiple files.
Copied code is based on Test_confirm_cmd() as of patch v8.2.0456.

N/A patches for version.c:

vim-patch:8.2.2274: badge for Travis is outdated

Problem:    badge for Travis is outdated.
Solution:   Update badge for move from travis-ci.org to travis-ci.com.
https://github.com/vim/vim/commit/2f91e2f8da572123e53ae7579dde57c750137def

vim-patch:8.2.2277: missing backslash

Problem:    Missing backslash.
Solution:   Add backslash.
https://github.com/vim/vim/commit/9281c6cae4e1cec2c661487d761d407bad7c6ad6
2021-01-02 18:46:31 -05:00
Jan Edmund Lazo 215aa83b2a vim-patch:8.1.1822: confusing error message when range is not allowed
Problem:    Confusing error message when range is not allowed.
Solution:   With ADDR_NONE give e_norange.  Change e_invaddr to e_invrange for
            consistency.
https://github.com/vim/vim/commit/0acae7acc40b9f12bff88d5e1dae494a761fec07
2021-01-02 12:20:35 -05:00
Jan Edmund Lazo cb5ba225f8 vim-patch:8.2.0407: no early check if :find and :sfind have an argument
Problem:    No early check if :find and :sfind have an argument.
Solution:   Add EX_NEEDARG.
https://github.com/vim/vim/commit/2d10cd478047df8ba144d4b0fcc46480993af57f

Cherry-pick Test_find_cmd() from patch v8.2.0270.
Use "exe 'cd ' . save_dir" pattern
because patches v8.1.1291, v8.1.2278 are not ported yet.
Cherry-pick modeline from patch v8.1.1432.
2021-01-02 12:20:35 -05:00
Jan Edmund Lazo ffc3df51f1 vim-patch:8.1.1667: flags for Ex commands may clash with other symbols
Problem:    Flags for Ex commands may clash with other symbols.
Solution:   Prepend with EX_.
https://github.com/vim/vim/commit/8071cb2c646c9d38dcd4e3ccd377dce07705f031

N/A patches for version.c:

vim-patch:8.1.1672: "make cmdidxs" doesn't work

Problem:    "make cmdidxs" doesn't work.
Solution:   Update macro names. (Naruhiko Nishino, closes vim/vim#4660)
https://github.com/vim/vim/commit/d94ac0caca12c6ceb54b07fc932edba84a5f60f2

Error message for src/nvim/ex_cmds.lua
which omits the "EX_" prefix for the flags.
2021-01-02 12:20:35 -05:00
Jan Edmund Lazo 01eda00962 vim-patch:8.2.0917: quickfix entries do not suport a "note" type
Problem:    Quickfix entries do not suport a "note" type.
Solution:   Add support for "note". (partly by Yegappan Lakshmanan,
            closes vim/vim#5527, closes vim/vim#6216)
https://github.com/vim/vim/commit/e928366de5deca359fad779a4f740db703296302
2021-01-02 12:20:34 -05:00
Matthieu Coudron 48caf1df85 Merge pull request #13649 from mjlbach/move_from_nvim-lspconfig
LSP: Move workspace/configuration from nvim-lspconfig to core
2021-01-01 23:52:48 +01:00
jdrouhard 4a0a6f7bff LSP: progress callback should only update existing dict for reports (#13652)
Change the update of the client.messages.progress table to overwrite only the percentage and message properties on $report, Previously we were overwriting the table which meant client.messages.progress[token].message.title was wiped on report.
2021-01-01 23:51:47 +01:00
Jan Edmund Lazo 5eccfd2b2e Merge pull request #13655 from janlazo/vim-8.2.2255
vim-patch:8.1.{1241,1261,1275,1281,1549,1590,1881,2079,2322,2360,2411},8.2.{113,388,934,2255,2258,2260,2269}
2021-01-01 17:40:26 -05:00
Jan Edmund Lazo 52bfaea70e test/win: skip vargs memory usage on Github Actions
This test can fail on any of the Windows builds
because Github Actions does not provide enough stability
and enough memory for all runners..

Check test requirements before running any test cases
to avoid duplicate checks.
2021-01-01 17:13:43 -05:00
Jan Edmund Lazo fc191352e9 vim-patch:8.2.2269: not all :hardcopy code covered by tests
Problem:    Not all :hardcopy code covered by tests.
Solution:   Test more combinations. (Dominique Pellé, closes vim/vim#7595)
https://github.com/vim/vim/commit/edc10b541b468f5f5aa2e2d5ef58a3e17e043bff
2021-01-01 16:56:25 -05:00
Jan Edmund Lazo 60855116f0 vim-patch:8.2.0388: printmbcharset option not tested
Problem:    Printmbcharset option not tested.
Solution:   Add a test.  Enable PostScript for AppVeyor build. (Dominique
            Pelle, closes vim/vim#5783)
https://github.com/vim/vim/commit/833805a4867cf5f93b3ef91227d1f1a98f553dff
2021-01-01 16:56:24 -05:00
Jan Edmund Lazo 85c658e388 vim-patch:8.2.2260: window resize test fails in very wide terminal
Problem:    Window resize test fails in very wide terminal.
Solution:   Resize using the 'columns' option.  (Vladimir Lomov, closes vim/vim#7592)
https://github.com/vim/vim/commit/5efe0e5d16db070f0ab0b944686139e597afe166
2021-01-01 16:56:24 -05:00
Jan Edmund Lazo b580cf83bd vim-patch:8.2.2258: not all OCaml related files are detected
Problem:    Not all OCaml related files are detected.
Solution:   Update OCaml file type detection.  (Markus Mottl, closes vim/vim#7590)
https://github.com/vim/vim/commit/beef4eeda5c6865fcfe46db43ae71429a2025b58
2021-01-01 16:56:24 -05:00
TJ DeVries 7718826edf docs: nvim_buf_set_text 2021-01-01 14:24:40 -05:00
Björn Linse dac3b35ece Merge pull request #11833 from bfredl/set_text
nvim_buf_set_text
2021-01-01 20:21:09 +01:00
Björn Linse 90f619f140 Merge pull request #13592 from bfredl/setmouse
ui: make 'mouse' handling in external UI more consistent
2021-01-01 20:04:09 +01:00
Björn Linse 39d098f9f9 api: set_text: fix some byte count issues
add byte count tests

update documentation
2021-01-01 19:51:58 +01:00
chentau f7d01a65d5 api: set_text: more tests, and fixing lint
removing pending virtcol tests

Allow passing in empty array as a shorthand for array with empty string; add more documentation

add check for start_row as well
2021-01-01 19:51:58 +01:00
Tony Chen 45b14f88db api: set_text: rebase, update to new api, and add more tests 2021-01-01 19:51:45 +01:00
Blaž Hrastnik 29ad2ebc16 api: set_text: fix validation and some issues
fix double free because intermediary lines weren't xmemdup'd.

NL-for-NUL dance.

Normalize row indices and perform more validation.

Adjust the cursor position if it's on the right side of the replacement.

Tests and documentation.
2021-01-01 19:51:37 +01:00
Björn Linse 9be19b770d api: set_text: first stab at nvim_buf_set_text 2021-01-01 19:51:24 +01:00
Jan Edmund Lazo 86ae394aeb vim-patch:8.2.0934: lhelpgrep twice in help window doesn't jump to the help topic
Problem:    Running lhelpgrep twice in a help window doesn't jump to the help
            topic.
Solution:   Check whether any window with the location list is present.
            (Yegappan Lakshmanan, closes vim/vim#6215)
https://github.com/vim/vim/commit/ec98e93a82379ca9289d8021aec374aa6798afef
2021-01-01 13:28:35 -05:00
Jan Edmund Lazo 134ea0c935 vim-patch:8.1.2360: quickfix test coverage can still be improved
Problem:    Quickfix test coverage can still be improved.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5276)
https://github.com/vim/vim/commit/15a7bdcb77faabbd3a9a889957f810da2bcda13e
2021-01-01 13:20:27 -05:00
Björn Linse 6db86cb2d3 ui: make 'mouse' handling in external UI more consistent
before the behaviour of 'mouse' was inconsistent in external UI,
as some remapping logic would check has_mouse() and others don't
(no difference in TUI or vim classic). With this change, the behaviour
is consistently up to the UI decide (see ui.txt edit)

Behaviour of tui.c is unaffected by this change.
2021-01-01 15:47:44 +01:00
Jan Edmund Lazo 3847b58a13 vim-patch:8.1.2411: function argument copied unnecessarily
Problem:    Function argument copied unnecessarily.
Solution:   Use the argument directly.
https://github.com/vim/vim/commit/1b03a193b3394597e4ed86aeea1e1b2c60ae9ad2
2021-01-01 04:58:05 -05:00
Jan Edmund Lazo d7b577d6ab vim-patch:8.1.1281: cannot specify a count with :chistory
Problem:    Cannot specify a count with :chistory.
Solution:   Add a count to :chistory and :lhistory. (Yegappan Lakshmanan,
            closes vim/vim#4344)
https://github.com/vim/vim/commit/8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c
2021-01-01 04:58:05 -05:00