Commit Graph

26121 Commits

Author SHA1 Message Date
zeertzjq
9e34aa76c1
vim-patch:9.0.1518: search stats not always visible when searching backwards (#23517)
Problem:    Search stats not always visible when searching backwards.
Solution:   Do not display the top/bot message on top of the search stats.
            (Christian Brabandt, closes vim/vim#12322, closes vim/vim#12222)

34a6a3617b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-05-07 07:57:29 +08:00
zeertzjq
e218965338
vim-patch:9.0.1514: test waits unnecessarily long before checking screendump (#23516)
vim-patch:9.0.1514: test waits unnecessarily long before checking screendump

Problem:    Test waits unnecessarily long before checking screendump.
Solution:   Remove TermWait() call.

45fcb7928a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-07 07:20:10 +08:00
zeertzjq
408a7c2dac
Merge pull request #23510 from luukvbaal/smoothscroll
vim-patch:9.0.{1512,1513}
2023-05-07 07:04:49 +08:00
Enan Ajmain
1bf29a0ae1
build: add system lua include dir for lpeg
Problem: Lpeg requires Lua headers.  Currently the include directories
for Lpeg are set only to the bundled deps folder, so if the user wants
to use system Lua/Luajit, Lpeg will not find the system headers and will
fail to build.

Solution: Add system Lua/Luajit include directories when USE_BUNDLED_LUA
and USE_BUNDLED_LUAJIT are turned off.

Fixes #23469
2023-05-07 00:47:45 +02:00
Luuk van Baal
8e74569d7e vim-patch:9.0.1513: text scrolls unnecessarily when splitting
Problem:    Text scrolls unnecessarily when splitting and 'splitkeep' is not
            "cursor".
Solution:   Avoid resetting w_skipcol. (Luuk van Baal, closes vim/vim#12334)

b926bf47d6
2023-05-07 00:38:45 +02:00
Luuk van Baal
3b2bd8d69e vim-patch:9.0.1512: inserting lines when scrolling with 'smoothscroll' set
Problem:    Inserting lines when scrolling with 'smoothscroll' set.
Solution:   Adjust line height computation for w_skipcol. (Luuk van Baal,
            closes vim/vim#12350)

c8502f9b88
2023-05-07 00:38:40 +02:00
marcoSven
9248dd77ac
feat(lua): add hl priority opts on yank (#23509)
feat(lua): add hl priority opts on_yank

Signed-off-by: marcoSven <me@marcosven.com>
2023-05-06 21:53:36 +02:00
bfredl
d48cd9a0aa
Merge pull request #23508 from clason/yeet-snap
build(snap): remove obsolete snapcraft.yaml
2023-05-06 21:37:47 +02:00
zeertzjq
ca5a810c4a
vim-patch:9.0.1511: crash when using wrong arg types to assert_match() (#23507)
Problem:    Crash when using wrong arg types to assert_match().
Solution:   Check for NULL pointer. (closes vim/vim#12349)

12e7a1fe75
2023-05-06 20:00:17 +08:00
Christian Clason
bfb81e1a85 build(snap): remove obsolete snapcraft.yaml
now lives in https://github.com/neovim/neovim-snap
2023-05-06 13:36:21 +02:00
dundargoc
a67b76943a
build(deps): point dependencies to specific commit
This way older neovim builds will work if we bump the dependency
versions.
2023-05-06 12:14:23 +02:00
bfredl
d94db80227
Merge pull request #23415 from zeertzjq/sigwinch-redraw
fix(tui): redraw on SIGWINCH even if size didn't change
2023-05-06 11:48:33 +02:00
dundargoc
5abba97d77
build: download dependencies with unreliable mirrors from deps repo
Closes https://github.com/neovim/neovim/issues/23493.
2023-05-06 11:40:03 +02:00
zeertzjq
a72e795eda
Merge pull request #23499 from zeertzjq/vim-8.2.2610
vim-patch:8.2.{2249,2610}: mouse click test fails over ssh
2023-05-06 11:15:13 +08:00
zeertzjq
f6cc0f614f vim-patch:8.2.2610: mouse click test fails when using remote connection
Problem:    Mouse click test fails when using remote connection.
Solution:   Use a larger 'mousetime'. (Dominique Pellé, closes vim/vim#7968)

1e448465e1
2023-05-06 10:03:40 +08:00
zeertzjq
4a4b10d9b6 vim-patch:8.2.2249: termcodes test is flaky when used over ssh
Problem:    Termcodes test is flaky when used over ssh with X forwarding.
Solution:   Set 'mousetime' to a larger value. (Dominique Pellé, closes vim/vim#7576,
            closes vim/vim#7563)

2a5c61a019
2023-05-06 10:03:39 +08:00
zeertzjq
e8661133c5
vim-patch:9.0.0904: various comment and indent flaws (#23498)
Problem:    Various comment and indent flaws.
Solution:   Improve comments and indenting.

88456cd3c4

Omit test_function_lists.vim change as that file is likely not
applicable to Nvim due to the existence of Nvim-only functions.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-06 09:34:29 +08:00
zeertzjq
b99f13385c
vim-patch:8.2.1746: Vim9: cannot use "fina" for "finally" (#23497)
Problem:    Vim9: Cannot use "fina" for "finally". (Naruhiko Nishino)
Solution:   Specifically check for "fina". (closes vim/vim#7020)

373863ed48

:final is N/A.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-06 08:56:00 +08:00
zeertzjq
b97d2abb21
Merge pull request #23488 from zeertzjq/vim-8.2.2094
vim-patch:8.2.{2094,2141},9.0.1508
2023-05-06 08:17:14 +08:00
zeertzjq
6b912dec8e vim-patch:9.0.1508: catch does not work when lines are joined with a newline
Problem:    Catch does not work when lines are joined with a newline.
Solution:   Set "nextcmd" appropriately. (closes vim/vim#12348)

f2588b6fc9
2023-05-06 07:47:43 +08:00
zeertzjq
ad7f9a701c vim-patch:8.2.2141: a user command with try/catch may not catch an expression error
Problem:    A user command with try/catch may not catch an expression error.
Solution:   When an expression fails check for following "|". (closes vim/vim#7469)

8143a53c53

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-06 07:47:43 +08:00
zeertzjq
aa5f3a7962 vim-patch:8.2.2094: when an expression fails getting next command may be wrong
Problem:    When an expression fails getting the next command may be wrong.
Solution:   Do not check for a next command after :eval fails. (closes vim/vim#7415)

d0fe620cbb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-06 07:47:40 +08:00
zeertzjq
22205f36a6
fix(api): don't change title when setting buffer in a window (#23492) 2023-05-06 07:46:07 +08:00
Christian Clason
c8ebb04e92
fix(health): replace healthFoo with DiagnosticFoo (#23475)
This replaces the custom `health{Error,Warning,Success}` highlight
groups with `Diagnostic{Error,Warning,Ok}`, which are defined by
default. Removes the link for `healthHelp`, which was no longer
actually used after #20879.
2023-05-05 18:15:44 +02:00
zeertzjq
c14aa66cce
Merge pull request #23487 from zeertzjq/vim-8.2.1953
vim-patch:8.2.1953,9.0.{0213,0404,0543,0846,0854,1507}: assert fixes
2023-05-05 20:05:18 +08:00
zeertzjq
c11417b3d7 vim-patch:9.0.1507: assert message is confusing with boolean result
Problem:    Assert message is confusing with boolean result.  assert_inrange()
            replaces message instead of adding it.
Solution:   Don't put quotes around expected boolean value.  Append message
            for assert_inrange(). (closes vim/vim#12342, closes vim/vim#12341)

53f5e51628

Move assert_type_T to testing.c and remove ASSERT_INRANGE.
2023-05-05 19:43:16 +08:00
zeertzjq
49c3eb01ab vim-patch:9.0.0854: no proper test for what 9.0.0846 fixes
Problem:    No proper test for what 9.0.0846 fixes.
Solution:   Run test in a terminal so that the hit-enter prompt can show up.
            (closes vim/vim#11523)

7265851b2b
2023-05-05 19:43:13 +08:00
zeertzjq
49a2bb9117 vim-patch:9.0.0846: using assert_fails() may cause hit-enter prompt
Problem:    Using assert_fails() may cause hit-enter prompt.
Solution:   Set no_wait_return. (closes vim/vim#11522)

f220643c26

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjq
050b24cbcc vim-patch:9.0.0543: insufficient testing for assert and test functions
Problem:    Insufficient testing for assert and test functions.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#11190)

e24b5e0b0f

Cherry-pick E1219 from patch 8.2.3229.
Cherry-pick test_assert.vim change from patch 9.0.0491.
Cherry-pick the whole Test_refcount() function and skip it.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-05 19:43:13 +08:00
zeertzjq
5fb6b3431a vim-patch:9.0.0404: crash when passing invalid arguments to assert_fails()
Problem:    Crash when passing invalid arguments to assert_fails().
Solution:   Check for NULL string.

1540d334a0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjq
17c8e39f88 vim-patch:9.0.0213: using freed memory with error in assert argument
Problem:    Using freed memory with error in assert argument.
Solution:   Make a copy of the error.

249e1b903a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjq
0a3a2132d4 vim-patch:8.2.1953: Vim9: extra "unknown" error after other error
Problem:    Vim9: extra "unknown" error after other error.
Solution:   Restore did_emsg count after EXEC instruction. (closes vim/vim#7254)
            Improve error message from assert_fails()

631e8f9345

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:10 +08:00
zeertzjq
d9f0d2da4d
Merge pull request #23482 from zeertzjq/do-cmdline-verbose
fix(excmd): append original command to error message
2023-05-05 19:33:06 +08:00
zeertzjq
3a1e17e3a1 test: add tests for executing commands with backwards range 2023-05-05 19:07:56 +08:00
jdrouhard
648f777931
perf(lsp): load buffer contents once when processing semantic tokens responses (#23484)
perf(lsp): load buffer contents once when processing semantic token responses

Using _get_line_byte_from_position() for each token's boundaries was a
pretty huge bottleneck, since that function would load individual buffer
lines via nvim_buf_get_lines() (plus a lot of extra overhead). So each
token caused two calls to nvim_buf_get_lines() (once for the start
position, and once for the end position).

For semantic tokens, we only attach to buffers that have already been
loaded, so we can safely just get all the lines for the entire buffer at
once, and lift the rest of the _get_line_byte_from_position()
implementation directly while bypassing the part that loads the buffer
line.

While I was looking at get_lines (used by _get_line_byte_from_position),
I noticed that we were checking for non-file URIs before we even looked
to see if we already had the buffer loaded. Moving the buffer-loaded
check to be the first thing done in get_lines() more than halved the
average time spent transforming the token list into highlight ranges vs
when it was still using _get_line_byte_from_position. I ended up
improving that loop more by not using get_lines, but figured the
performance improvement it provided was worth leaving in.
2023-05-05 07:41:36 +02:00
zeertzjq
4a098b97e5 fix(excmd): append original command to error message
Revert the change to do_cmdline_cmd() from #5226.

This function is used in many places, so making it different from Vim
leads to small differences from Vim in the behavior of some functions
like execute() and assert_fails(). If DOCMD_VERBOSE really needs to be
removed somewhere, a do_cmdline() call without DOCMD_VERBOSE is also
shorter than a do_cmdline() call with DOCMD_VERBOSE.
2023-05-05 10:43:28 +08:00
zeertzjq
9ded4c1275
Merge pull request #23483 from zeertzjq/vim-8.2.3135
vim-patch:8.2.{3135,4890,4892},9.0.0250: error message improvements
2023-05-05 09:50:36 +08:00
zeertzjq
bdaaf2e8e1 vim-patch:9.0.0250: slightly inconsistent error messages
Problem:    Slightly inconsistent error messages.
Solution:   Make it "Using a Float". (closes vim/vim#10959)

dde77a7c4d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 09:20:30 +08:00
zeertzjq
15c502d8be vim-patch:8.2.4892: test failures because of changed error messages
Problem:    Test failures because of changed error messages.
Solution:   Adjust the exptected error messages.

ec89223478

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 09:20:30 +08:00
zeertzjq
88cfb49bee vim-patch:8.2.4890: inconsistent capitalization in error messages
Problem:    Inconsistent capitalization in error messages.
Solution:   Make capitalization consistent. (Doug Kearns)

cf030578b2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 09:20:30 +08:00
zeertzjq
b8d5586d5b refactor: using a different error number for 'mousescroll'
Because E548 is linked to 'guicursor' in help.
2023-05-05 09:19:06 +08:00
zeertzjq
75119fcc86 vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile time
Problem:    Vim9: builtin function arguments not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539)

5b73992d8f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-05 09:19:05 +08:00
zeertzjq
d79e726212
vim-patch:8.2.4397: crash when using many composing characters in error message (#23481)
Problem:    Crash when using many composing characters in error message.
Solution:   Use mb_cptr2char_adv() instead of mb_ptr2char_adv().

34f8117dec

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 06:22:37 +08:00
zeertzjq
f6299e9d6e
vim-patch:8.2.3221: Vim9: argument types are not checked at compile time (#23480)
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks. (Yegappan Lakshmanan, closes vim/vim#8632)

a764e73d4f

Cherry-pick test_assert.vim change from patch 8.2.3229.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-05 06:22:18 +08:00
zeertzjq
b16729f816
vim-patch:8.2.1697: inconsistent capitalization of error messages (#23476)
Problem:    Inconsistent capitalization of error messages.
Solution:   Always start with a capital.

7707228aac

Most of these errors are Vim9 script only.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-04 23:17:43 +08:00
zeertzjq
fe7cdc7cc0
vim-patch:9.0.0601: too much indent (#23472)
Problem:    Too much indent.
Solution:   Return out early from a funtion. (Yegappan Lakshmanan,
            close vim/vim#11238)

368aa69088

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-04 19:07:54 +08:00
zeertzjq
7ae57435be
Merge pull request #23470 from zeertzjq/vim-8.2.2344
vim-patch:8.2.{1461,1462,1466,2344,2607,2756}
2023-05-04 18:29:18 +08:00
zeertzjq
8752da89b8 vim-patch:8.2.2756: Vim9: blob index and slice not implemented yet
Problem:    Vim9: blob index and slice not implemented yet.
Solution:   Implement blob index and slice.

cfc3023cb6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-04 17:59:21 +08:00
zeertzjq
3724e65c30 vim-patch:8.2.2607: strcharpart() cannot include composing characters
Problem:    strcharpart() cannot include composing characters.
Solution:   Add the {skipcc} argument.

02b4d9b18a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-04 17:49:56 +08:00
zeertzjq
b441dafdf5 vim-patch:8.2.2344: using inclusive index for slice is not always desired
Problem:    Using inclusive index for slice is not always desired.
Solution:   Add the slice() method, which has an exclusive index. (closes
            vim/vim#7408)

6601b62943

Cherry-pick a line in docs added later.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-04 17:40:29 +08:00