Commit Graph

3693 Commits

Author SHA1 Message Date
zeertzjq
4ca522fd02 test: convert some colorcolumn tests to Lua screen tests 2022-02-12 06:36:17 +08:00
Christian Clason
4761dd4fc2
Merge pull request #17365 from kevinhwang91/fix-ts-empty-lines
fix(query.lua): check empty table for lines
2022-02-11 15:19:19 +01:00
kevinhwang91
58d81efcb2 fix: append test for checking zero width node range 2022-02-11 20:59:47 +08:00
zeertzjq
5546492c44 test: convert Test_file_changed_dialog() to Lua functional test 2022-02-11 20:37:20 +08:00
Christian Clason
2db0a52074
Merge pull request #17360 from lewis6991/fix-window-close
fix: close floating windows when calling win_close()
2022-02-11 10:37:13 +01:00
zeertzjq
851252f79d
Merge pull request #17012 from EdmundsEcho/fix-checkhealth
prevent checkhealth failure when plugin's check returns void
2022-02-11 05:50:49 +08:00
Rom Grk
85ae04dbfd fix: close floating windows when calling win_close() 2022-02-10 15:26:40 +00:00
zeertzjq
23c3f7f572 fix(api): use changedir_func() in nvim_set_current_dir()
Co-Authored-By: smolck <46855713+smolck@users.noreply.github.com>
2022-02-10 09:45:20 +08:00
zeertzjq
d9cb3fba92 vim-patch:8.2.4242: put in Visual mode cannot be repeated
Problem:    Put in Visual mode cannot be repeated.
Solution:   Use "P" to put without yanking the deleted text into the unnamed
            register. (Shougo Matsushita, closes vim/vim#9591)
fb55207ed1

Cherry-pick get_y_previous() and set_y_previous() from patch 8.1.1736.
Nvim has removed y_current, so code related to it is N/A.
2022-02-09 14:21:04 +08:00
Edmund Cape
300b009f47 fix(healthcheck): handle empty reports 2022-02-09 10:18:22 +08:00
zeertzjq
68603998b9 test: add Lua functional tests for Ex mode 2022-02-08 14:47:23 +08:00
zeertzjq
fe621b4ac0 vim-patch:8.1.0711: test files still use function!
Problem:    Test files still use function!.
Solution:   Remove the exclamation mark.  Fix overwriting a function.
1e1153600c

Some of the changes were already applied previously.
2022-02-07 05:34:20 +08:00
bfredl
f0699f4356
Merge pull request #17279 from zeertzjq/state-enter-vpeekc
fix(event-loop): call vpeekc() directly first to check for character
2022-02-06 19:22:02 +01:00
zeertzjq
8215c05945
Merge pull request #17194 from zeertzjq/inccommand-prev-sub
fix(inccommand): do not change reg_prev_sub when previewing
2022-02-06 10:18:59 +08:00
Lewis Russell
92e92f02e7
fix(diff): make algorithm work for vim.diff (#17300)
Fixes #17207
2022-02-05 09:49:48 -08:00
glacambre
5b34c2ab73 fix(--headless): do not block on press-enter prompts when no UI
This commit fixes #9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes #11718, as when combined with #15910 it enables making
sure that neovim never blocks and emits messages on startup.
2022-02-05 13:02:33 +01:00
zeertzjq
a4078fa57e test(old): add test_expand.vim
This removes expand_spec.lua and copies test_expand.vim from Vim at
version v8.1.2278.

The rest of patch 8.1.2278 were already applied in #15952, so this marks
that patch as fully ported.

vim-patch:8.1.2278: using "cd" with "exe" may fail

Problem:    Using "cd" with "exe" may fail.
Solution:   Use chdir() instead.
3503d7c94a
2022-02-05 16:41:23 +08:00
zeertzjq
9b0363d365 vim-patch:8.2.1128: the write message mentions characters, but it's bytes
Problem:    The write message mentions characters, but it's actually bytes.
Solution:   Change "C" to "B" and "characters" to "bytes".
3f40ce78f5
2022-02-04 22:17:25 +08:00
zeertzjq
2fd0720de2 test: convert some search stat screendump tests to Lua screen tests 2022-02-04 18:47:20 +08:00
Sean Dewar
452b46fcf7
fix(api/nvim_win_call): share common win_execute logic
We have to be sure that the bugs fixed in the previous patches also apply to
nvim_win_call.

Checking v8.1.2124 and v8.2.4026 is especially important as these patches were
only applied to win_execute, but nvim_win_call is also affected by the same
bugs. A lot of win_execute's logic can be shared with nvim_win_call, so factor
it out into a common macro to reduce the possibility of this happening again.
2022-02-03 15:03:08 +00:00
Sean Dewar
6820420d3e
vim-patch:8.2.4028: ml_get error with :doautoall and Visual area
Problem:    ml_get error with :doautoall and Visual area. (Sean Dewar)
Solution:   Disable Visual mode while executing autocommands.
cb1956d6f2

This should also fix #16937 for nvim_buf_call, so test for it.
2022-02-03 15:03:08 +00:00
zeertzjq
a87ecf5d08 fix(health): do not run external processes in a shell 2022-02-03 18:38:37 +08:00
zeertzjq
74998b0449 fix(event-loop): call vpeekc() directly first to check for character
Expand mappings first by calling `vpeekc()` directly.
2022-02-03 13:43:48 +08:00
bfredl
5be2cdd913
Merge pull request #17187 from lewis6991/master
feat(highlight): ns=0 to set :highlight namespace
2022-02-01 17:16:14 +01:00
Lewis Russell
4aa0cdd3aa feat(highlight): ns=0 to set :highlight namespace
Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
2022-02-01 11:54:12 +00:00
zeertzjq
f4300985d3
Merge pull request #17113 from zeertzjq/vim-8.2.2569
feat(statusline): support multibyte fillchar
2022-02-01 17:57:01 +08:00
zeertzjq
5205bcc904
Merge pull request #17254 from zeertzjq/vim-8.2.3787
vim-patch:8.2.{3787,3932,3934,3935,3938}: text formatting patches
2022-02-01 04:23:59 +08:00
Shougo
f195345c93
[RFC] fix: has('python') error (#17252)
* fix: has('python') error

* fix: functional tests
2022-01-31 15:06:46 +01:00
zeertzjq
ef5cd99df0 test: remove 003_cindent_spec.lua
This no longer needed as Vim patch 8.1.1434 has been ported.
2022-01-31 15:44:54 +08:00
dundargoc
4a96e7809f
chore: typo fixes (#16921)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-29 23:15:22 +00:00
Daniel Steinberg
a94632d212 vim-patch:8.2.3917: the eval.txt help file is way too big
Problem:    The eval.txt help file is way too big.
Solution:   Move the builtin function details to a separate file.
1cae5a0a03

Note: Neovim-specific references to |functions| were changed to
|builtin-functions|. This included updates to:
  1. test/functional/vimscript/functions_spec.lua
  2. test/functional/vimscript/eval_spec.lua
  3. runtime/doc/lua.txt
2022-01-29 15:19:29 -05:00
bfredl
e0242c4a93
Merge pull request #17222 from bfredl/babajpy2
feat(provider)!: remove support for python2 and python3.[3-6]
2022-01-29 20:22:25 +01:00
Björn Linse
baec0d3152 feat(provider)!: remove support for python2 and python3.[3-5]
These versions of python has reached End-of-life. getting rid
of python2 support removes a lot of logic to support two
incompatible python versions in the same version.
2022-01-29 19:49:37 +01:00
bfredl
4b719e4a16
Merge pull request #17192 from zeertzjq/aucmd-redrawingdisabled
fix: set RedrawingDisabled before entering aucmd_win
2022-01-29 19:16:48 +01:00
Evgeni Chasnovski
5e1c487d99
vim-patch:8.2.4090: after restoring a session buffer order can be quite different (#17112)
Problem:    After restoring a session buffer order can be quite different.
Solution:   Create buffers first. (Evgeni Chasnovski, closes vim/vim#9520)
26ebf1f036

---------------
As in Vim, this basically reverts 8.1.0829 providing different solution
(see vim/vim#9520).

Regarding Neovim, this basically reverts changes from #15062. Test about
restoring same terminals was a bit too restrictive with using actual
buffer ids, which changed with this patch (now they should be in the
same order as at `mksession` call), so I tweaked it.
2022-01-29 14:08:44 +00:00
bfredl
cf4d025c5a
Merge pull request #17209 from bb010g/patch-1
fix(eval): v:lua support for `-` in module names
2022-01-29 11:45:15 +01:00
zeertzjq
75f4741db9 fix(input): remove reinterpreted ALT/META chords from recorded macro 2022-01-29 06:05:14 +08:00
bb010g
fb8cd340dc fix(eval): v:lua support for - in module names 2022-01-28 18:20:26 +01:00
bfredl
ca3e382a4f
Merge pull request #17183 from notomo/expose-extmark-right-gravity
feat(api): expose extmark right_gravity and end_right_gravity
2022-01-28 12:38:56 +01:00
zeertzjq
69f37197c0
fix(completion): update submode message when selecting from API (#17022) 2022-01-28 07:55:10 +08:00
bfredl
a47fdf8421
Merge pull request #17175 from zeertzjq/vim-8.2.3095
vim-patch:8.2.3095: with 'virtualedit' set to "block" block selection is wrong
2022-01-27 13:44:30 +01:00
zeertzjq
f2d84df4a8 vim-patch:8.2.3095: with 'virtualedit' set to "block" block selection is wrong
Problem:    With 'virtualedit' set to "block" block selection is wrong after
            using "$".  (Marco Trosi)
Solution:   Compute the longest selected line. (closes vim/vim#8495)
b17ab86e7b
2022-01-27 18:55:21 +08:00
Lewis Russell
f9080b24c4
fix(ts): escape lang when loading parsers (#16668)
When trying to load a language parser, escape the value of
the language.

With language injection, the language might be picked up from the
buffer. If this value is erroneous it can cause `nvim_get_runtime_file`
to hard error.

E.g., the markdown expression `~~~{` will extract '{' as a language and
then try to get the parser using `parser/{*` as the pattern.
2022-01-27 10:42:59 +01:00
bfredl
3d0149f984
Merge pull request #17191 from zeertzjq/vim-8.2.4203
vim-patch:8.2.4203: entering a character with CTRL-V may include modifiers
2022-01-27 09:00:01 +01:00
bfredl
55ad48d939
Merge pull request #17155 from zeertzjq/vim-8.2.3121
vim-patch:8.2.{3121,3410}: two 'listchars' fixes
2022-01-27 08:32:52 +01:00
bfredl
f1b91fcdbd
Merge pull request #17102 from zeertzjq/vim-8.2.1762
vim-patch:8.2.1762: when a timer uses :stopinsert completion isn't stopped
2022-01-27 08:31:17 +01:00
zeertzjq
d11bbacf0f fix(inccommand): do not change reg_prev_sub when previewing 2022-01-25 16:18:58 +08:00
zeertzjq
dd21e21e97 fix: set RedrawingDisabled before entering aucmd_win 2022-01-25 09:44:37 +08:00
zeertzjq
95873aa3eb test: add more tests for Insert mode Ctrl-V 2022-01-25 08:29:04 +08:00
bfredl
1b6ae2dbb0
Merge pull request #15910 from glacambre/silent_stdioopen
feat(--headless): do not print anything when stdioopen() has been used
2022-01-24 22:33:55 +01:00