Problem: Tests may leave leftover files around
Solution: Clean up tests and remove files
There were a few failures in 'linux (huge, gcc, testgui, true, true)'
e.g. here: https://github.com/vim/vim/actions/runs/5497376153/jobs/10018060156
,----
| Error detected while processing command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[585]..function RunTheTest[54]..Test_lvimgrep_crash[16]..TestTimeout[12]..VimLeavePre Autocommands for "*"..function EarlyExit[7]..FinishTesting:
| line 70:
| E445: Other window contains changes
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txtmalloc(): unsorted double linked list corrupted
`----
Which is puzzling, because the Xtest_stable_xxd file should have been
long gone after test_crypt.vim is run (and definitely no longer be
staying around in test_quickfix.vim).
So try to clean up properly after a test script is run, just in case any
X<file> is still around. During testing, a found a few leftover files,
which I also fixed in the relevant test-file.
Unfortunately, the test workflow 'linux (huge, gcc, testgui, true,
true)' now seems to fail with 'E1230: Encryption: sodium_mlock()' in
test_crypt.vim. Hopefully this is only temporary.
84bc00e9b5
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Blade files are not recognized.
Solution: Add a pattern for Blade files. (closesvim/vim#12650)
ad34abee25
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for bad use of spaces in help files.
Solution: Add checks for use of spaces in help files. Ignore intentional
spaces. (Hirohito Higashi, closesvim/vim#11952)
d950984489
Cherry-pick changes from patch 9.0.1604.
Co-authored-by: h-east <h.east.727@gmail.com>
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Tabline highlight wrong after truncated double width label.
Solution: Fill up half a double width character later. (closesvim/vim#12614)
d392a74c5a
Problem: Resetting local option to global value is inconsistent.
Solution: Handle "<" specifically for 'scrolloff' and 'sidescrolloff'.
(closesvim/vim#12594)
bf5f189e44
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Regression test doesn't fail when fix is reverted.
Solution: Add "n" to 'cpoptions' instead of using :winsize. (closesvim/vim#12587,
issue vim/vim#12528)
e429893741
Problem: Divide by zero when scrolling with 'smoothscroll' set.
Solution: Avoid using a negative width. (closesvim/vim#12540, closesvim/vim#12528)
8154e642aa
Co-authored-by: fullwaywang <fullwaywang@tencent.com>
Problem: Not all cabal config files are recognized.
Solution: Add a couple of patterns. (Marcin Szamotulski, closesvim/vim#12463)
166cd7b801
Also:
- Do not expand Lua patterns in environment variables used in file patterns.
- Test $XDG_CONFIG_HOME on Windows, as it can be used by Nvim (and the runner
sets it).
Co-authored-by: Marcin Szamotulski <coot@coot.me>
Problem: Empty CmdlineEnter autocommand causes errors in Ex mode.
Solution: Save and restore ex_pressedreturn. (Christian Brabandt,
closes # 12581, closesvim/vim#12578)
590aae3557
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Not all filetype file name matches are tested.
Solution: Add more file names to test with. (Jonas Strittmatter,
closesvim/vim#12569)
bd087ae8f0
Co-authored-by: smjonas <jonas.strittmatter@gmx.de>
Problem: zserio files are not recognized.
Solution: Add a pattern for zserio files. (Dominique Pellé,
closesvim/vim#12544)
2b994da57a
Co-authored-by: =?UTF-8?q?Dominique=20Pell=C3=A9?= <dominique.pelle@gmail.com>
Co-authored by: zeertzjq <zeertzjq@outlook.com>
Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com>
Co-authored by: nobe4 <nobe4@users.noreply.github.com>
- docs: mention --luadev-mod to run with lua runtime files
When changing a lua file in the ./runtime folder, a new contributor
might expect changes to be applied to the built Neovim binary.
Problem: Error message is cleared when removing mode message.
Solution: Also reset flags when the message is further down.
da51ad51bf
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Message is cleared when removing mode message (Gary Johnson).
Solution: Do not clear the command line after displaying a message.
800cdbb7ca
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Expanding a pattern interferes with command line completion.
Solution: Set the file index only when appropriate. (closesvim/vim#12519)
094dd152fe
Problem: Having utf16idx() rounding up is inconvenient.
Solution: Make utf16idx() round down. (Yegappan Lakshmanan, closesvim/vim#12523)
95707037af
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Vim9: not enough test coverage for executing :def function.
Solution: Add a few more tests. Fix inconsistencies.
6b8c7ba062
Cherry-pick a blank line in test_listdict.vim from patch 8.2.3842.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no type check when assigning a list range. (Naohiro Ono)
Solution: Check the member type. (closesvim/vim#8750)
89071cb6a1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Run more existing tests for Vim9 script.
700e6b1662
Cherry-pick test_listdict.vim change from patch 8.2.3854.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Also run existing tests for Vim9 script. Make errors more
consistent.
f47c5a8e2d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests run with Vim9.
Solution: Run a few more tests in Vim9 script and :def function. Fix that
items(), keys() and values9) return zero for a NULL dict.
Make join() return an empty string for a NULL list. Make sort()
return an empty list for a NULL list.
ef98257593
Skip f_reverse() change for consistency with other functions.
Skip Test_null_list() and Test_null_dict() because of missing patches.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: tests are only executed for legacy script.
Solution: Run more tests also for Vim9 script. Fix uncovered problems.
5dd839ce20
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough code is tested.
Solution: Use CheckLegacyAndVim9Success() in more places. Fix uncovered
problems.
63cb6567f0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Tests failing because there is no error for float to string
conversion.
Solution: Change the check for failure to check for correct result. Make
some conversions strict in Vim9 script.
3cfa5b16b0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Substitute() accepts a number but not a float expression.
Solution: Also accept a float. (closesvim/vim#8331)
7a2217bedd
Vim9script is N/A. No need to port the strict argument and
tv_get_string_buf_chk_strict(), as it's only used for Vim9script.
Like the patch, use vim_snprintf over snprintf, as the "%g" specifier in
snprintf removes the ".0" from integer floats.
This means similiar to numbers, floats are (mostly) convertable to
strings.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No longer get an error for string concatenation with float.
(Tsuyoshi Cho)
Solution: Only convert float for Vim9 script. (closesvim/vim#6787)
2e0866128b
Vim9script is N/A.
Required for v8.2.2949.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Visual area not shown when using 'showbreak' and start of line is
not visible. (Jaehwang Jung)
Solution: Adjust "fromcol" for the space taken by 'showbreak'.
(closesvim/vim#12514)
f578ca2c8f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Filetype name t32 is a bit obscure.
Solution: Rename t32 to trace32. (Christoph Sax, closesvim/vim#12512)
740df76c90
Co-authored-by: Christoph Sax <christoph.sax@mailbox.org>
Problem: charidx() and utf16idx() result is not consistent with byteidx().
Solution: When the index is equal to the length of the text return the
lenght of the text instead of -1. (Yegappan Lakshmanan,
closesvim/vim#12503)
577922b917
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Nix files are not recognized from the hashbang line.
Solution: Add a hashbang check. (issue vim/vim#12507)
19548c6a74
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Trace32 files are not recognized.
Solution: Add patterns for the t32 filetype. (Christoph Sax, closesvim/vim#12505)
7fbcee6f92
Co-authored-by: Christoph Sax <christoph.sax@mailbox.org>
Problem: Quickfix text field is truncated.
Solution: Fix output of text field after pattern field in quickfix buffer.
(Shane Harper, closesvim/vim#12498)
5bf042810b
Co-authored-by: Shane Harper <shane@shaneharper.net>
Problem: URL shortcut files are not recognized.
Solution: Add a pattern for URL shortcut files. (closesvim/vim#12474)
cdb7b4c508
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Removes the `getoption_T` struct and also introduces the `OptVal` struct
to unify the methods of getting/setting different option value types.
This is the first of many PRs to reduce code duplication in the Vim
option code as well as to make options easier to maintain. It also
increases the flexibility and extensibility of options. Which opens the
door for things like Array and Dictionary options.
The options 'path', 'include', and 'define' all use C-specific default
values. This may have made sense a long time ago when Vim was mostly
used just for writing C, but this is no longer the case, and we have
ample support for filetype specific configuration. Make the default
values of these options empty and move the C-specific values into a
filetype plugin where they belong.
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem: "skipcol" not reset when using multi-byte characters.
Solution: Compare with w_virtcol instead of w_cursor.col. (closesvim/vim#12457)
15d4747ffd
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Display is wrong when 'smoothscroll' is set and scrolling multiple
lines.
Solution: Redraw with UPD_NOT_VALID when "skipcol" is or was set.
(closesvim/vim#12490, closesvim/vim#12468)
d9a92dc70b
Problem: screenpos() returns wrong row with diff filler lines.
Solution: Only add filler lines when appropriate. Also don't add the
'smoothscroll' marker when w_skipcol is zero. (closesvim/vim#12485,
closesvim/vim#12484)
55daae3921
Problem: screenpos() does not take w_skipcol into account.
Solution: Subtract w_skipcol from column. (closesvim/vim#12486, closesvim/vim#12476)
f0e68c0e2a
Problem: Stray character is visible if 'smoothscroll' marker is displayed
on top of a double-wide character.
Solution: When overwriting a double-width character with the 'smoothscroll'
marker clear the second half. (closesvim/vim#12469)
ecb87dd7d3
Problem: Filetype detection fails for *.conf file without comments.
(Dmitrii Tcyganok)
Solution: Use "conf" filetype as a fallback for an empty .conf file.
(closesvim/vim#12487, closesvim/vim#12483)
664fd12aa2
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem: Cursor not adjusted when near top or bottom of window and
'splitkeep' is not "cursor".
Solution: Move boundary checks to outer cursor move functions, inner
functions should only return valid cursor positions. (Luuk van
Baal, closesvim/vim#12480)
a109f39ef5
Problem: Cursor ends up below the window after a put.
Solution: Mark w_crow and w_botline invalid when changing the cursor line.
(closesvim/vim#12465)
8509014add
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: screenchar(), screenchars() and screenstring() do not work
properly when 'encoding' is set to a double-byte encoding.
Solution: Fix the way the bytes of the characters are obtained.
(issue vim/vim#12469)
47eec6716b
Problem: Line pointer becomes invalid when using spell checking.
Solution: Call ml_get() at the right places. (Luuk van Baal, closesvim/vim#12456)
e84c773d42
Problem: :registers command does not work in sandbox.
Solution: Add flag to the command. (closesvim/vim#12473)
eb43b7f053
Co-authored-by: Julio B <julio.bacel@gmail.com>
Problem: Incsearch not triggered when pasting clipboard register on the
command line.
Solution: Also set "literally" when using a clipboard register. (Ken Takata,
closesvim/vim#12460)
9cf6ab1332
Co-authored-by: K.Takata <kentkt@csc.jp>
Problem: Some "gomod" files are not recognized.
Solution: Check for "go.mod" file name before checking out the contents.
(Omar El Halabi, closesvim/vim#12462)
c9fbd2560f
Problem: :stopinsert may not work in a popup close handler. (Ben Jackson)
Solution: Restore stop_insert_mode when appropriate. (closesvim/vim#12452,
closesvim/vim#12434)
a40c0bcc83
Problem: SpellCap highlight not always updated when needed.
Solution: Handle updating line below closed fold and other situations where
only part of the window is redrawn. (Luuk van Baal, closesvim/vim#12428,
closesvim/vim#12420)
2ac6497f0e
Problem: Bad redrawing with spell checking, using "C" and "$" in 'cpo'.
Solution: Do not redraw the next line when "$" is in 'cpo'. (closesvim/vim#11285)
f3ef026c98
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: With spell checking, deleting a full stop at the end of a line
does not update SpellCap at the start of the next line.
Solution: Update the next line when characters have been deleted. Also when
using undo.
26f09ea54b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: After exiting Insert mode spelling is not checked in the next
line.
Solution: When spelling is enabled redraw the next line after exiting Insert
mode in case the spell highlight needs updating.
ee09fcc9b6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Spell checking for capital not working with trailing space.
Solution: Do not calculate cap_col at the end of the line. (Christian
Brabandt, closesvim/vim#10870, issue vim/vim#10838)
afa23d1b99
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Some tests are slow.
Solution: Make a few test cases faster.
bf63011a52
Cherry-pick related test_cmdline.vim changes from patch 9.0.0418.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: With 'smoothscroll' cursor may move below botline.
Solution: Call redraw_later() if needed, Compute cursor row with adjusted
condition. (Luuk van Baal, closesvim/vim#12415)
d49f646bf5
Problem: Test fails because of changed error message.
Solution: Adjust the expected error message.
6b02b38ed0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Display wrong when moving cursor to above the top line and
'smoothscroll' is set.
Solution: Call adjust_skipcol() in more places and make it work better.
(Luuk van Baal, closesvim/vim#12395)
798fa76dbf
Problem: setcharsearch() does not clear last searched char properly.
Solution: Do not accept lastc_bytelen smaller than one. (closesvim/vim#12398)
e5d91ba1de
Problem: Position of marker for 'smoothscroll' not computed correctly.
Solution: Take 'list' and other options into account. (Luuk van Baal,
closesvim/vim#12393)
24b62ec825
Problem: Using negative array index with negative width window.
Solution: Make sure the window width does not become negative.
8279af514c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using freed memory with cmdwin and BufEnter autocmd.
Solution: Make sure pointer to b_p_iminsert is still valid.
1c3dd8ddcb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Reading before the start of the line.
Solution: When displaying "$" check the column is not negative.
e98c88c44c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Confusing error when using "q:" in command line window.
Solution: Check for the situation and give a better error message.
(closesvim/vim#10756)
c963ec31a0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: USD filetype is not recognized.
Solution: Add patterns for USD filetype. (Colin Kennedy, closesvim/vim#12370)
b848ce6b7e
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
Problem: Some commands for opening a file don't use 'switchbuf'.
Solution: Use 'switchbuf' for more commands. (Yegappan Lakshmanan,
closesvim/vim#12383, closesvim/vim#12381)
54be5fb382
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Text not scrolled when cursor moved with "g0" and "h".
Solution: Adjust w_skipcol when needed. (Luuk van Baal, closesvim/vim#12387)
8667a5678f
Problem: Display errors when making topline shorter and 'smoothscroll' is
set.
Solution: Reset w_skipcol when the topline becomes shorter than its current
value. (Luuk van Baal, closesvim/vim#12367)
5d01f86d99
Problem: Line not fully displayed if it doesn't fit in the screen.
Solution: Do not reset s_skipcol if not needed. (Luuk van Baal,
closesvim/vim#12376)
6c018680be
Problem: :wqall does not trigger ExitPre. (Bart Libert)
Solution: Move preparations for :qall to a common function. (closesvim/vim#12374)
411da64e77
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cursor moves to wrong line when 'foldmethod' is "diff". (Rick
Howe)
Solution: Adjust logic for scrolling. (Luuk van Baal, closesvim/vim#12364,
closesvim/vim#12218)
aa6ba308a1
Problem: 'smoothscroll' does not always work properly.
Solution: Do not reset w_skipcol after it was intentionally set. (Luuk van
Baal, closesvim/vim#12360, closesvim/vim#12199, closesvim/vim#12323)
3ce8c38915
Problem: Some functions give two error messages.
Solution: Do not give a second error message. (closesvim/vim#12352)
e4098457ab
It seems that tv_get_bool() is actually not exactly the same as
tv_get_number(), so change it to a function instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot use special keys in <Cmd> mapping.
Solution: Do allow for special keys in <Cmd> and <ScriptCmd> mappings.
(closesvim/vim#12326)
3ab3a86481
Problem: Making a mapping work in all modes is complicated.
Solution: Add the <Cmd> special key. (Yegappan Lakshmanan, closesvim/vim#7282,
closes 4784, based on patch by Bjorn Linse)
957cf67d50
Change docs to match Vim if it's wording is better.
Change error numbers to match Vim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Completion for option name includes all bool options.
Solution: Do not recognize the "noinv" prefix. Prefix "no" or "inv" when
appropriate.
048d9d2521
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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: 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: 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>
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: 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>
Problem: Behavior of negative index in list change changed. (Naruhiko
Nishino)
Solution: Only change it for Vim9 script. (closesvim/vim#8749)
92f05f21af
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when using ":mkspell" with an empty .dic file.
Solution: Check for an empty word tree.
6669de1b23
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Not enough characters accepted for 'spellfile'.
Solution: Add vim_is_fname_char() and use it for 'spellfile'.
bc49c5f48f
Cherry-pick related doc update from Vim runtime.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Blockedit test passes with wrong result.
Solution: Add a "vim9script" line to make indenting work.
47da934844
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Blockedit test fails because of wrong indent.
Solution: Adjust the expected text temporarily
66000ff9af
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Mouse shape test is flaky, especially on Mac OS.
Solution: Instead of starting all timers at the same time, start the next
one in the callback of the previous one. (Yee Cheng Chin,
closesvim/vim#11673) Also use "bwipe!" instead of "close!" to avoid
swap files remaining.
1881abfc34
Cherry-pick test_normal.vim changes from patch 8.2.3795.
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Problem: Concealed characters do not work correctly.
Solution: Subtract boguscols instead of adding them. (closesvim/vim#11273)
7500866182
Code change is N/A as Nvim has a draw_col variable instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for deleting the end of a long wrapped line.
Solution: Add a test to check the right text is displayed. (Luuk van Baal,
closesvim/vim#12318)
5b10a14098
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
Problem: Scrolling too many lines when 'wrap' and 'diff' are set.
Solution: Only scroll by screenlines for 'diff' when 'wrap' is not set.
(closesvim/vim#12211)
38d867f041
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Divide by zero with 'smoothscroll' set and a narrow window.
Solution: Bail out when the window is too narrow.
870219c58c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cursor positioning and display problems with 'smoothscroll' and
using "zt", "zb" or "zz".
Solution: Adjust computations and conditions. (Yee Cheng Chin,
closesvim/vim#11764)
db4d88c2ad
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: With 'smoothscroll' skipcol may be reset unnecessarily.
Solution: Check the line does actually fit in the window.
b21b8e9ed0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: "gk" may reset skipcol when not needed.
Solution: Only reset skipcol if the cursor column is less.
1b73edd9ee
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: With 'smoothscroll' set mouse click position may be wrong.
Solution: Adjust computations for w_skipcol. (Yee Cheng Chin, closesvim/vim#11514)
e6392b1021
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Problem: With 'smoothscroll' cursor may end up in wrong position.
Solution: Correct the computation of screen lines. (Yee Cheng Chin,
closesvim/vim#11502)
361895d2a1
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Problem: Cursor moves too far with 'smoothscroll'.
Solution: Only move as far as really needed. (Yee Cheng Chin, closesvim/vim#11504)
81ba26e9de
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Problem: With 'smoothscroll' cursor is one screen line too far down. (Ernie
Rael)
Solution: Add a test that currently has the wrong result so that a fix can
be made. (issue vim/vim#11436)
75ac25b496
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: 'smoothscroll' cursor calculations wrong when 'number' is set.
Solution: Correct the code that computes the width. (closesvim/vim#11492)
01ee52bab6
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Problem: May redraw when not needed, causing slow scrolling.
Solution: Do not redraw when w_skipcol doesn't change. When w_skipcol
changes only redraw from the top. (issue vim/vim#11559)
f32fb93e43
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: "precedes" from 'listchars' overwritten by <<< for 'smoothscroll'.
Solution: Keep the "precedes" character.
13cdde3952
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Line number not visisble with 'smoothscroll', 'nu' and 'rnu'.
Solution: Put the ">>>" after the line number instead of on top.
eb4de62931
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Breakindent test cases are commented out.
Solution: Adjust expected result to slightly different behavior. Correct
computations for cursor position.
856c5d2bc7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Wrong cursor position when using "gj" and "gk" in a long line.
Solution: Adjust computations for the cursor position and skipcol. Re-enable
tests that pass now, disable failing breakindent test.
4b6172e108
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cursor position invalid when scrolling with 'smoothscroll' set.
(Ernie Rael)
Solution: Add w_valid_skipcol and clear flags when it changes. Adjust
w_skipcol after moving the cursor.
2fbabd238a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: With 'smoothscroll' and 'scrolloff' non-zero the cursor position
is not properly adjusted in a long line.
Solution: Move the cursor further up or down in the line.
118c235112
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: With 'smoothscroll' the cursor position s not adjusted in a long
line.
Solution: Move the cursor further up or down in the line.
8cf3459878
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: "<<<" shows for 'smoothscroll' even when 'showbreak is set.
Solution: When 'showbreak' is set do not display "<<<".
0937b9fb24
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Breakindent test accepts wrong result.
Solution: Fix the number column and adjust the expected text.
06618f94f1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: First line not scrolled properly with 'smoothscroll' and
'scrolloff' zero and using "k".
Solution: Make sure the cursor position is visible.
46b54747c5
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cursor line only partly shows with 'smoothscroll' and 'scrolloff'
zero.
Solution: Do not use 'smoothscroll' when adjusting the bottom of the window.
(closesvim/vim#11269)
9bab7a0243
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Negative topline using CTRL-Y with 'smoothscroll' and 'diff'.
(Ernie Rael)
Solution: Only use 'smoothscroll' when 'wrap' is set.
1a58e1d97c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: 'smoothscroll' not tested with 'number' and "n" in 'cpo'.
Solution: Add tests, fix uncovered problem.
b6aab8f44b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: with 'smoothscroll' set CTRL-E does not work properly when
'foldmethod' is set to "indent". (Yee Cheng Chin)
Solution: Merge the code for scroling with folds and 'smoothscroll'.
(closesvim/vim#11262)
6b2d4ff714
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: CTRL-Y does not stop at line 1. (John Marriott)
Solution: Stop at line 1 when 'smoothscroll' is not set. (closesvim/vim#11261)
8df9748edb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: 'smoothscroll' is not copied to a new window on :split.
Solution: Copy the option value. Add a test.
b1fd26d208
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot scroll by screen line if a line wraps.
Solution: Add the 'smoothscroll' option. Only works for CTRL-E and CTRL-Y
so far.
f6196f4244
vim-patch:9.0.0641: missing part of the new option code
Problem: Missing part of the new option code.
Solution: Add missing WV_SMS.
bbbda8fd81
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using uninitialized memory with fuzzy matching.
Solution: Initialize the arrays used to store match positions.
caf642c25d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Heredoc in scripts does not accept lower case marker.
Solution: Allow lower case only in non-Vim scripts. (Ken Takata,
closesvim/vim#6019)
6ab0953fef
Problem: Heredoc for interfaces does not support "trim".
Solution: Update the script heredoc support to be same as the :let command.
(Yegappan Lakshmanan, closesvim/vim#5916)
6c2b7b8055
Problem: Test for 'toolbariconsize' may fail.
Solution: Only test 'toolbariconsize' when it is supported. (James McCoy,
closesvim/vim#12095)
db1887ce40
Co-authored-by: James McCoy <jamessan@jamessan.com>
Problem: Still some "else if" constructs for setting options.
Solution: Add a few more functions for handling options. (Yegappan
Lakshmanan, closesvim/vim#12090)
c6ff21e876
Problem: Too many "else if" statements in handling options.
Solution: Add more functions for handling option changes. (Yegappan
Lakshmanan, closesvim/vim#12060)
5da901bb68
Problem: Too many "else if" statements for handling options.
Solution: Add more functions to handle options. (Yegappan Lakshmanan,
closesvim/vim#12051)
8ad862a1f9
Problem: Not all mouse codes covered by tests.
Solution: Add more tests for the mouse. (Yegappan Lakshmanan, closesvim/vim#6472)
2764d06ab7
Cherry-pick typo fixes from patch 8.2.0020.
Problem: Double and triple clicks are not tested.
Solution: Test mouse clicks to select text. (closesvim/vim#5226)
f36a2c7e60
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for right click extending Visual area.
Solution: Add a test. (Dominique Pelle, closesvim/vim#5018)
6aa7523b96
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No tests for dragging the mouse beyond the window.
Solution: Add a test. (Dominique Pelle, closesvim/vim#5004)
b4367b7fb6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Urxvt mouse codes are not tested.
Solution: Also set 'ttymouse' to "urxvt" in the termcodes test.
d0621d85a6
Use code from latest tests instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No tests for CTRL-mouse-click.
Solution: Add a few tests. (Dominique Pelle, closesvim/vim#4323)
1ee36d6ff5
Use usr_toc.txt instead of help.txt.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Middle mouse click test fails without a clipboard.
Solution: Check if the clipboard can be used. (Dominique Pelle, Christian
Brabandt) Also use WorkingClipboard() instead of checking for the
"clipboard" feature.
564344ace9
Use CheckFeature clipboard_working from latest test instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Tests for mouse clicks are a bit flaky when run in an interactive
terminal.
Solution: Use "xterm2" instead of "xterm" for 'ttymouse' to avoid spurious
drag events.
2b00b9b0f3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for mouse clicks in the fold column.
Solution: Add a test. (Dominique Pelle, closesvim/vim#4261)
696d637728
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: When mouse click tests fails value of 'ttytype' is unknown.
Solution: Add a message to the assert.
4945219b99
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for dragging a tab with the mouse and for creating a new
tab by double clicking in the tabline.
Solution: Add two tests. (Dominique Pelle, closesvim/vim#4258)
e3e3828f93
Set 'mousetime' to 0 instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>