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, closesvim/vim#12322, closesvim/vim#12222)
34a6a3617b
Co-authored-by: Christian Brabandt <cb@256bit.org>
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>
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
Problem: Text scrolls unnecessarily when splitting and 'splitkeep' is not
"cursor".
Solution: Avoid resetting w_skipcol. (Luuk van Baal, closesvim/vim#12334)
b926bf47d6
Problem: Inserting lines when scrolling with 'smoothscroll' set.
Solution: Adjust line height computation for w_skipcol. (Luuk van Baal,
closesvim/vim#12350)
c8502f9b88
Problem: Termcodes test is flaky when used over ssh with X forwarding.
Solution: Set 'mousetime' to a larger value. (Dominique Pellé, closesvim/vim#7576,
closesvim/vim#7563)
2a5c61a019
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>
Problem: A user command with try/catch may not catch an expression error.
Solution: When an expression fails check for following "|". (closesvim/vim#7469)
8143a53c53
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: When an expression fails getting the next command may be wrong.
Solution: Do not check for a next command after :eval fails. (closesvim/vim#7415)
d0fe620cbb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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.
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(). (closesvim/vim#12342, closesvim/vim#12341)
53f5e51628
Move assert_type_T to testing.c and remove ASSERT_INRANGE.
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.
(closesvim/vim#11523)
7265851b2b
Problem: Using assert_fails() may cause hit-enter prompt.
Solution: Set no_wait_return. (closesvim/vim#11522)
f220643c26
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Insufficient testing for assert and test functions.
Solution: Add a few more tests. (Yegappan Lakshmanan, closesvim/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>
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>
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.
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.
Problem: Test failures because of changed error messages.
Solution: Adjust the exptected error messages.
ec89223478
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: builtin function arguments not checked at compile time.
Solution: Add more type checks. (Yegappan Lakshmanan, closesvim/vim#8539)
5b73992d8f
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
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>
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closesvim/vim#8632)
a764e73d4f
Cherry-pick test_assert.vim change from patch 8.2.3229.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
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>
Problem: Too much indent.
Solution: Return out early from a funtion. (Yegappan Lakshmanan,
closevim/vim#11238)
368aa69088
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Vim9: blob index and slice not implemented yet.
Solution: Implement blob index and slice.
cfc3023cb6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>