Commit Graph

20999 Commits

Author SHA1 Message Date
zeertzjq
a6eafc77ce fix(paste): deal with trailing new line in chunk 2022-03-15 18:15:18 +08:00
zeertzjq
fcc6f66cf2 fix(paste): avoid edges cases caused by empty chunk 2022-03-15 18:15:18 +08:00
zeertzjq
21ba2d81a8 refactor(paste): do not print dots in cmdline mode 2022-03-15 18:15:18 +08:00
zeertzjq
bfb7754442 fix(paste): deal with eol and eof in Visual mode 2022-03-15 18:15:18 +08:00
zeertzjq
2601e0873f fix(paste): don't move cursor past the end of pasted text in Normal mode 2022-03-15 18:15:18 +08:00
zeertzjq
9b1e1fbc9f fix(paste): use getcmdtype() to determine whether in cmdline mode 2022-03-15 18:15:18 +08:00
zeertzjq
bef7552f70
Merge pull request #17725 from zeertzjq/vim-8.2.4566
vim-patch:8.2.4566: check for existing buffer in session file may not work
2022-03-15 10:20:00 +08:00
zeertzjq
2ea16f7354 vim-patch:8.2.4566: check for existing buffer in session file may not work
Problem:    Check for existing buffer in session file does not work for files
            in the home directory.
Solution:   Use fnamemodify(). (James Cherti, closes vim/vim#9945)  Add a test.
7d42840033
2022-03-15 08:25:39 +08:00
bfredl
61126fcc69
Merge pull request #17718 from dundargoc/doxygen/eval_c
refactor(eval): convert function comments to doxygen format
2022-03-14 20:59:57 +01:00
Sean Dewar
2fbbd3258e
Merge pull request #17488 from seandewar/vim-8.2.4428
vim-patch:8.2.{1401,1413,4428,4432,4434,4438,4442,4444,4445,4454}: tabpage patches
2022-03-14 13:55:12 +00:00
Dundar Göc
378db4f32a refactor(eval): convert function comments to doxygen format 2022-03-14 14:22:58 +01:00
Sean Dewar
365a9b074f
vim-patch:8.2.1413: previous tab page not usable from an Ex command
Problem:    Previous tab page not usable from an Ex command.
Solution:   Add the "#" argument for :tabnext et al. (Yegappan Lakshmanan,
            closes vim/vim#6677)
94f4ffa770

Do not rename old_curtab to prev_tp in win_new_tabpage, this can be confused
with the previous tabpage (`:tabprevious`).

Cherry-pick ex_errmsg from v8.2.1280.
8930caaa1a
2022-03-14 13:10:57 +00:00
Sean Dewar
c5f190e0c2
vim-patch:8.2.1401: cannot jump to the last used tabpage
Problem:    Cannot jump to the last used tabpage.
Solution:   Add g<Tab> and tabpagnr('#'). (Yegappan Lakshmanan, closes vim/vim#6661,
            neovim #11626)
62a232506d

Nvim implemented this feature before Vim, but Vim made some useful changes (e.g:
beeping on failure). Port the changes to closer match Vim (also makes porting
future patches easier).

Also note that because CHECK_CMDWIN was added to goto_tabpage_tp, there is no
need to do the extra work with tabpage_index and goto_tabpage inside
goto_tabpage_lastused to fix cmdwin issues any more (#11692).
Note that while goto_tabpage_tp doesn't check for textlock like goto_tabpage
does, it shouldn't matter as it is already checked for earlier.

Add tags for <C-Tab> to tabpage.txt, and refer to <C-Tab> over CTRL-Tab to be
consistent with other docs like the patch.
Remove mention of "previous tabpage" (it can be confused with the tabpage to the
left, e.g: `:tabprevious`).
Similarly, don't rename old_curtab to last_tab in enter_tabpage (it might be
confused with the right-most tabpage, e.g: `:tablast`).

Cherry-pick Test_tabpage change from v8.2.0634.
92b83ccfda
2022-03-14 13:10:57 +00:00
Sean Dewar
7e19c18a54
vim-patch:8.2.4454: resetting cmdwin_type only for one situation
Problem:    Resetting cmdwin_type only for one situation.
Solution:   Reset cmdwin_type before closing windows. (closes vim/vim#9822)
6a8b13614e

Move the check to win_free_all to match Vim.
2022-03-14 13:10:57 +00:00
Sean Dewar
70582bd925
vim-patch:8.2.4445: exit test fails on MS-Windows anyway
Problem:    Exit test fails on MS-Windows anyway.
Solution:   Skip the test on MS-Windows.
29a9e69718
2022-03-14 13:10:57 +00:00
Sean Dewar
0412dba456
vim-patch:8.2.4444: beep caused by test
Problem:    Beep caused by test.  ASAN reports leaks.
Solution:   Do not put a NL at the end of the script.  Make the text work on
            MS-Windows.  Do not run the test with ASAN.
68eab67119

The test is skipped, but cherry-pick CheckNotAsan from v8.2.2424 anyway.
97202d9516
2022-03-14 13:10:56 +00:00
Sean Dewar
fe53182934
vim-patch:8.2.4442: test for error reading input fails on MS-Windows
Problem:    Test for error reading input fails on MS-Windows.
Solution:   Don't run the test on MS-Windows.
70b9e4f4c3
2022-03-14 13:10:56 +00:00
Sean Dewar
7519af4f0f
vim-patch:8.2.4438: crash on exit when using cmdline window
Problem:    Crash on exit when using cmdline window.
Solution:   Reset "cmdwin_type" before exiting. (closes vim/vim#9817)
ca0c1caa36

Bram also went with the cmdwin_type = 0 solution, but putting it in
read_error_exit isn't ideal and only fixes one specific variant of the bug, so
don't port that change.

Port the test only, but skip it as Nvim does not exit after stdin is exhausted.
Using -es instead does exit, but read_error_exit does not run preserve_exit in
that case, and does not have issues exiting even without resetting cmdwin_type.

Note that the test has problems and is fixed in later patches.
2022-03-14 13:10:56 +00:00
Sean Dewar
490874f3da
vim-patch:8.2.4432: cannot use settabvar() while the cmdline window is open
Problem:    Cannot use settabvar() while the cmdline window is open.
Solution:   Only give an error when actually switching tabpage.
            (closes vim/vim#9813)
592f625001
2022-03-14 13:10:56 +00:00
Sean Dewar
880d3537d0
vim-patch:8.2.4428: crash when switching tabpage while in the cmdline window
Problem:    Crash when switching tabpage while in the cmdline window.
Solution:   Disallow switching tabpage when in the cmdline window.
0f6e28f686

Ensure cmdline window doesn't stop us from closing tabs with EXITFREE.
mem_free_all -> win_free_all -> tabpage_close -> ... -> goto_tabpage_tp
-> CHECK_CMDWIN can cause an infinite loop if Nvim is exited without using
standard methods such as :qa! and friends (e.g: killed via a signal).
This issue had caused the ASAN CI's functionaltests to timeout.

Cherry-pick Test_cmdwin_tabpage from v8.2.4463.
38b85cb4d7
This bug was already fixed in Nvim. Note that g<Tab> inside cmdwin is already
tested for in tabnewentered_spec.lua anyway.

E492 is thrown after E11 when using ":norm" in assert_fails for some reason
(except after v8.2.1919, which isn't ported yet).
As v8.2.1183 isn't ported yet, so we cannot assert E11 directly.
Modify the test to check for E11 and E492 seperately; when v8.2.1183 is ported,
the assertion for E492 will fail and the changes can be reverted to match
upstream.

Remove redundant CHECK_CMDWIN from goto_tabpage; it's handled with text_locked()
and text_locked_msg() above:

vim-patch:8.2.4434: duplicate check for cmdline window

Problem:    Duplicate check for cmdline window.
Solution:   Remove the second check. (Sean Dewar, closes vim/vim#9816)
16b51d26fe
2022-03-14 13:10:20 +00:00
bfredl
895ca52e4c
Merge pull request #17717 from dundargoc/doxygen/eval/funcs
refactor(eval/funcs): convert function comments to doxygen format
2022-03-14 13:38:38 +01:00
Dundar Göc
4d6863554b refactor(eval/funcs): convert function comments to doxygen format 2022-03-14 13:08:52 +01:00
Daiki Mizukami
ecc36c3d1c
docs: remove extra whitespaces 2022-03-14 08:16:01 +09:00
Daiki Mizukami
be2def4100
chore(gen_vimdoc): fall back to brief_desc_node when desc_node is empty 2022-03-14 07:53:42 +09:00
Daiki Mizukami
334a16c791
refactor(gen_vimdoc): simplify files in CONFIG 2022-03-14 07:53:42 +09:00
Daiki Mizukami
cf4786ddfa
chore(gen_vimdoc): call delete_lines_below only if the file exists
Previously, `delete_lines_below` would raise `FileNotFoundError` when
adding a new file to `CONFIG` and you had to manually write a file with
help tag of the first section as placeholder. This change relieves you
of that need.
2022-03-14 07:53:41 +09:00
Daiki Mizukami
2d28c40ef9
refactor(gen_vimdoc): detect section_start_token automatically 2022-03-14 07:53:41 +09:00
bfredl
6dc2c82931
Merge pull request #17696 from dundargoc/refactor/minimize-scope
refactor: minimize variable scope and eliminate empty declarations
2022-03-13 23:17:57 +01:00
Gregory Anders
f9f843e02e
refactor: use Lua autocommands in filetype.lua (#17711) 2022-03-13 15:52:41 -06:00
Dundar Göc
198bf3a8f2 refactor: minimize variable scope and eliminate empty declarations 2022-03-13 20:44:53 +01:00
zeertzjq
ce537bb232
Merge pull request #17697 from lewis6991/screenrefactor
refactor: column drawing
2022-03-13 23:07:50 +08:00
Lewis Russell
f3f67da340 refactor: column drawing
- move some logic out of win_line into specific easy to read
  sub-functions.

- remove drawing logic from get_sign_display_info.
2022-03-13 22:41:31 +08:00
zeertzjq
6e1caeaf3a vim-patch:8.2.4557: confusing comment about 'cursorlineopt'
Problem:    Confusing comment about 'cursorlineopt'.
Solution:   Adjust comment.  (closes vim/vim#9939)  Add parenthesis around logical
            OR.
754d2b4036
2022-03-13 22:28:37 +08:00
dundargoc
4ba12b3dda
refactor: fix clint warnings (#17682) 2022-03-13 22:11:17 +08:00
zeertzjq
4ede2ea4b2
test: fix runnvim.sh (#17690) 2022-03-13 22:07:22 +08:00
zeertzjq
c45644f994
test(python3_spec): use a pattern to match SyntaxError message (#17705) 2022-03-13 22:05:56 +08:00
adrian5
9e6bc228ec
docs(api): improve section on nvim_set_hl (#17692) 2022-03-13 06:42:12 -06:00
zeertzjq
c9b94188d5
Merge pull request #17702 from zeertzjq/vim-8.1.0877
vim-patch:8.1.{0877,0892,1015},8.2.{3759,3762}: quickfix patches
2022-03-13 14:21:37 +08:00
VVKot
ff48e61ec9 vim-patch:8.2.3762: if quickfix buffer is wiped out getqflist() still returns it
Problem:    If the quickfix buffer is wiped out getqflist() still returns its
            number.
Solution:   Use zero if the buffer is no longer present. (Yegappan Lakshmanan,
            closes vim/vim#9306)
56150da687
2022-03-13 13:17:28 +08:00
VVKot
c5e47e44aa vim-patch:8.2.3759: quickfix buffer becomes hidden while still in a window
Problem:    Quickfix buffer becomes hidden while still in a window.
Solution:   Check if the closed window is the last window showing the quickfix
            buffer. (Yegappan Lakshmanan, closes vim/vim#9303, closes vim/vim#9300)
78a61068cf
2022-03-13 13:17:28 +08:00
zeertzjq
dc32a20503 test(old): add some missing tests from Vim patches 8.1.2320 and 8.1.2360 2022-03-13 13:17:28 +08:00
Jan Edmund Lazo
163ec00f44 vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer number
Problem:    Quickfix buffer shows up in list, can't get buffer number.
Solution:   Make the quickfix buffer unlisted when the quickfix window is
            closed.  get the quickfix buffer number with getqflist().
            (Yegappan Lakshmanan, closes vim/vim#4113)
647e24ba3d
2022-03-13 13:17:28 +08:00
VVKot
6c26ab71ce vim-patch:8.1.0892: failure when closing a window when location list is in use
Problem:    Failure when closing a window when location list is in use.
Solution:   Handle the situation gracefully. Make sure memory for 'switchbuf'
            is not freed at the wrong time. (Yegappan Lakshmanan,
            closes vim/vim#3928)
eeb1b9c7ed
2022-03-13 13:17:28 +08:00
Jan Edmund Lazo
91ac0088e1 vim-patch:8.1.0877: new buffer used every time the quickfix window is opened
Problem:    New buffer used every time the quickfix window is opened.
Solution:   Reuse the buffer. (Yegappan Lakshmanan, closes vim/vim#3902)
ee8188fc74
2022-03-13 13:17:28 +08:00
zeertzjq
0cf2dc63bf fix(win_split_ins): do not fail when oldwin is not valid
Ref #14240
2022-03-13 13:17:22 +08:00
dundargoc
d33aebb821
feat(runtime): import cleanadd.vim from Vim (#17699)
Latest version from Vim v7.2a.
Closes https://github.com/neovim/neovim/issues/12875
2022-03-13 04:52:45 +00:00
Gregory Anders
f291a0339c
fix: use normal! <C-L> in default <C-L> mapping (#17695) 2022-03-12 17:56:53 -07:00
zeertzjq
356631cba0
Merge pull request #17687 from zeertzjq/fix-channel-consistency
fix(channel): fix channel consistency
2022-03-13 05:44:50 +08:00
bfredl
36ca585d2f
Merge pull request #17691 from bfredl/serverconnect
feat(ui): connect to remote ui (beginning of ui client)
2022-03-12 21:11:37 +01:00
bfredl
a4400bf8cd feat(ui): connect to remote ui (only debug messages for now)
co-authored-by: hlpr98 <hlpr98@gmail.com>
2022-03-12 19:24:46 +01:00