summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_normal.vim
AgeCommit message (Collapse)Author
2024-03-29patch 9.1.0228: Two unrelated things are tested by a single testv9.1.0228zeertzjq
Problem: Two unrelated things are tested by a single test. Solution: Split it into two, restoring the old Test_brace_single_line(). Add missing cleanup to some tests. (zeertzjq) closes: #14323 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28patch 9.1.0215: Half-page scrolling does not support smooth-scrollingv9.1.0215Luuk van Baal
Problem: Page-wise scrolling with Ctrl-D/Ctrl-U implements it's own logic to change the topline and cursor. More logic than necessary for scrolling with Ctrl-F/Ctrl-B was removed in patch 9.1.0211. Solution: Re-use the logic from Ctrl-E/Ctrl-Y/Ctrl-F/Ctrl-B while staying backward compatible as much as possible. Restore some of the logic that determined how many lines will be scrolled (Luuk van Baal) closes: #14316 Signed-off-by: Luuk van Baal <luukvbaal@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26patch 9.1.0211: page-wise scrolling does not support smooth-scrollingv9.1.0211Luuk van Baal
Problem: Page-wise scrolling with Ctrl-F/Ctrl-B implements it's own logic to change the topline and cursor. In doing so, skipcol is not handled properly for 'smoothscroll', and virtual lines. Solution: Re-use the logic from Ctrl-E/Ctrl-Y while staying backward compatible as much as possible. closes: #14268 Signed-off-by: Luuk van Baal <luukvbaal@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13patch 9.1.0177: Coverity reports dead codev9.1.0177zeertzjq
Problem: Coverity reports dead code. Solution: Remove the dead code. Also fix a mistake in ml_get_pos_len() and update some comments (zeertzjq). closes: #14189 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12patch 9.1.0101: upper-case of German sharp s should be U+1E9Ev9.1.0101glepnir
Problem: upper-case of ß should be U+1E9E (CAPITAL LETTER SHARP S) (fenuks) Solution: Make gU, ~ and g~ convert the U+00DF LATIN SMALL LETTER SHARP S (ß) to U+1E9E LATIN CAPITAL LETTER SHARP S (ẞ), update tests (glepnir) This is part of Unicode 5.1.0 from April 2008, so should be fairly safe to use now and since 2017 is part of the German standard orthography, according to Wikipedia: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E#cite_note-auto-12 There is however one exception: UnicodeData.txt for U+00DF LATIN SMALL LETTER SHARP S does NOT define U+1E9E LATIN CAPITAL LETTER SHARP S as its upper case version. Therefore, toupper() won't be able to convert from lower sharp s to upper case sharp s (the other way around however works, since U+00DF is considered the lower case character of U+1E9E and therefore tolower() works correctly for the upper case version). fixes: #5573 closes: #14018 Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23patch 9.1.0049: Make "[Command Line]" a special buffer namev9.1.0049Sean Dewar
Problem: E95 is possible if a buffer called "[Command Line]" already exists when opening the cmdwin. This can also happen if the cmdwin's buffer could not be deleted when closing. Solution: Un-name the cmdwin buffer, and give it a special name instead, similar to what's done for quickfix buffers and for unnamed prompt and scratch buffers. As a result, BufFilePre/Post are no longer fired when opening the cmdwin. Add a "command" key to the dictionary returned by getbufinfo() to differentiate the cmdwin buffer instead. (Sean Dewar) NOTE: This is technically a breaking change... maybe this needs a different solution? (Or maybe this issue can be ignored...) A GitHub search reveals some plugins expect the old behaviour. However, many of those plugins also do not seem to account for the string being translated, so they are subtly broken anyway (not withstanding the fact that you can call any old buffer "[Command Line]" too...) closes: #12819 Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12patch 9.1.0025: A few typos in tests and justify.vimv9.1.0025dundargoc
Problem: A few typos in tests and justify.vim Solution: fix them closes: #13848 Signed-off-by: dundargoc <gocdundar@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05patch 9.1.0015: i_CTRL-R- no longer works in replace modev9.1.0015Christian Brabandt
Problem: i_CTRL-R- no longer works in replace mode Solution: delete characters in replace mode before putting, add a test, add a bit warning into the documentation, that i_CTRL-R-P/O is not supported in Replace mode for now fixes: #13792 closes: #13816 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27patch 9.0.2188: cursor wrong after { in single line bufferv9.0.2188Gary Johnson
Problem: cursor wrong after { in single line buffer (Edwin Chan) Solution: do not place the cursor at the end for a single line buffer when moving backwards (Gary Johnson) closes: #13780 closes: #13783 Signed-off-by: Gary Johnson <garyjohn@spocom.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16patch 9.0.2109: [security]: overflow in nv_z_get_countv9.0.2109Christian Brabandt
Problem: [security]: overflow in nv_z_get_count Solution: break out, if count is too large When getting the count for a normal z command, it may overflow for large counts given. So verify, that we can safely store the result in a long. Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-20patch 9.0.1919: Wrong curswant when clicking on empty line or with vsplitsv9.0.1919zeertzjq
Problem: Wrong curswant when clicking on empty line or with vsplits. Solution: Don't check for ScreenCols[] before the start of the window and handle empty line properly. closes: #13132 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-09patch 9.0.1886: Various Typosv9.0.1886Christian Brabandt
Problem: Various Typos Solution: Fix Typos This is a collection of typo related commits. closes: #12753 closes: #13016 Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Viktor Szépe <viktor@szepe.net> Co-authored-by: nuid64 <lvkuzvesov@proton.me> Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com> Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-20patch 9.0.1761: g<kEnd> behaves different from g<end>v9.0.1761zeertzjq
Problem: g<kEnd> behaves different from g<end> Solution: Make g<kEnd> behave like g<End> closes: #12861 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-19patch 9.0.1753: can't move to last non-blank charv9.0.1753Christian Brabandt
Problem: can't move to last non-blank char Solution: Make g<end> behave like that Make it possible to move to last non-blank char on a line We can distinguish between g0 and g^ to move to the very first character and the first non-blank char. And while we can move to the last screen char, we cannot go to the last non-blank screen char. Since I think g$ is the more widely used and known movement command (and g<end> is synonymous to it) change the behaviour of g<end> to move to last non-screen char instead and don't have this be the same command as the g$ command anymore. If you want to keep the old behaviour, you can use: ``` nnoremap g<end> g$ ``` Add a test to verify the behaviour. closes: #12593 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-19patch 9.0.1742: wrong curswant when clicking on second cell of double-width charv9.0.1742zeertzjq
Problem: Wrong curswant when clicking and the second cell of a double-width char. Solution: Don't copy virtcol of the first char to the second one. closes: #12842 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17patch 9.0.1725: cursor pos wrong after concealed text with 'virtualedit'v9.0.1725zeertzjq
Problem: Wrong cursor position when clicking after concealed text with 'virtualedit'. Solution: Store virtual columns in ScreenCols[] instead of text columns, and always use coladvance() when clicking. This also fixes incorrect curswant when clicking on a TAB, so now Test_normal_click_on_ctrl_char() asserts the same results as the ones before patch 9.0.0048. closes: #12808 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-13patch 9.0.1705: cursor position wrong when clicking on an unprintable charv9.0.1705zeertzjq
Problem: cursor position wrong when clicking on an unprintable char Solution: Don't update prev_ptr when wlv.n_extra is not zero. closes: #12664 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-12patch 9.0.1693: Ctrl-Q not handled like Ctrl-V in replace modev9.0.1693Christian Brabandt
Problem: Ctrl-Q not handled like Ctrl-V in replace mode Solution: Handle Ctrl-Q like Ctrl-V closes: #12686 closes: #12684 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-05-09patch 9.0.1530: cursor moves to wrong line when 'foldmethod' is "diff"v9.0.1530Luuk van Baal
Problem: Cursor moves to wrong line when 'foldmethod' is "diff". (Rick Howe) Solution: Adjust logic for scrolling. (Luuk van Baal, closes #12364, closes #12218)
2023-05-07patch 9.0.1521: failing redo of command with control charactersv9.0.1521zeertzjq
Problem: Failing redo of command with control characters. Solution: Use AppendToRedobuffLit() for colon commands. (closes #12354)
2023-03-06patch 9.0.1386: options test fails with some window widthv9.0.1386zeertzjq
Problem: Options test fails with some window width. Solution: Adjust what text the test checks with. (closes #12111)
2023-03-05patch 9.0.1385: g'Esc is considered an errorv9.0.1385zeertzjq
Problem: g'Esc is considered an error. Solution: Make g'Esc silently abandon the command. (closes #12110)
2023-02-26patch 9.0.1356: cannot cancel "gr" with Escv9.0.1356zeertzjq
Problem: Cannot cancel "gr" with Esc. Solution: Make "gr<Esc>" do nothing. (closes #12064)
2023-01-28patch 9.0.1257: code style is not check in test scriptsv9.0.1257Bram Moolenaar
Problem: Code style is not check in test scripts. Solution: Add basic code style check for test files.
2023-01-25patch 9.0.1243: :setglobal cannot use script-local function for "expr" optionv9.0.1243zeertzjq
Problem: :setglobal cannot use script-local function for "expr" option. Solution: Use the pointer to the option value properly. (closes #11883)
2022-12-08patch 9.0.1028: mouse shape test is flaky, especially on Mac OSv9.0.1028Yee Cheng Chin
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, closes #11673) Also use "bwipe!" instead of "close!" to avoid swap files remaining.
2022-11-26patch 9.0.0954: cannot detect whether modifyOtherKeys is enabledv9.0.0954Bram Moolenaar
Problem: Cannot detect whether modifyOtherKeys is enabled. Solution: Use XTQMODKEYS introduced by xterm version 377 to request the modifyOtherKeys level. Update the keycode check results.
2022-11-15patch 9.0.0884: mouse shape remains in op-pending mode after failed changev9.0.0884zeertzjq
Problem: Mouse shape remains in op-pending mode after failed change. Solution: Reset finish_op and restore it. (closes #11545)
2022-10-13patch 9.0.0745: wrong cursor position when using "gj" and "gk" in a long linev9.0.0745Bram Moolenaar
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.
2022-10-12patch 9.0.0735: breakindent and scrolloff tests failv9.0.0735Bram Moolenaar
Problem: Breakindent and scrolloff tests fail. Solution: Temporarily skip the assertions.
2022-09-29patch 9.0.0626: too many delete() calls in testsv9.0.0626Bram Moolenaar
Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
2022-09-02patch 9.0.0363: common names in test files causes tests to be flakyv9.0.0363Bram Moolenaar
Problem: Common names in test files causes tests to be flaky. Solution: Use more specific names.
2022-07-06patch 9.0.0043: insufficient testing for bracket commandsv9.0.0043zeertzjq
Problem: Insufficient testing for bracket commands. Solution: Add a few more tests. (closes #10668)
2022-07-02patch 9.0.0027: the command line test is getting quite bigv9.0.0027Bram Moolenaar
Problem: The command line test is getting quite big. Solution: Move command line window tests to a separate file.
2022-06-16patch 8.2.5109: mode not updated after CTRL-O CTRL-C in Insert modev8.2.5109Bram Moolenaar
Problem: Mode not updated after CTRL-O CTRL-C in Insert mode. Solution: Set redraw_mode and use it. (closes #10581)
2022-05-28patch 8.2.5035: when splitting a window the changelist position movesv8.2.5035zeertzjq
Problem: When splitting a window the changelist position moves. Solution: Set the changelist index a bit later. (closes #10493)
2022-04-03patch 8.2.4672: using :normal with Ex mode may make :substitute hangv8.2.4672Bram Moolenaar
Problem: Using :normal with Ex mode may make :substitute hang. Solution: When getting an empty line behave like 'q' was typed. (closes #10070)
2022-02-12patch 8.2.4361: Vim9: some tests failv8.2.4361Bram Moolenaar
Problem: Vim9: some tests fail. Solution: Fix the tests, mostly by removing "s:".
2022-01-29patch 8.2.4257: Vim9: finding global function without g: prefix inconsistentv8.2.4257Bram Moolenaar
Problem: Vim9: finding global function without g: prefix but not finding global variable is inconsistent. Solution: Require using g: for a global function. Change the vim9.vim script into a Vim9 script with exports. Fix that import in legacy script does not work.
2022-01-27patch 8.2.4228: no tests for clicking in the GUI tablinev8.2.4228Yegappan Lakshmanan
Problem: No tests for clicking in the GUI tabline. Solution: Add test functions to generate the events. Add tests using the functions. (Yegappan Lakshmanan, closes #9638)
2022-01-03patch 8.2.3990: testing wrong operatorv8.2.3990naohiro ono
Problem: Testing wrong operator. Solution: Test "g@" instead of "r_". (Naohiro Ono, closes #9463)
2022-01-02patch 8.2.3980: if 'operatorfunc' invokes an operator Visual mode is changedv8.2.3980Bram Moolenaar
Problem: If 'operatorfunc' invokes an operator the remembered Visual mode may be changed. (Naohiro Ono) Solution: Save and restore the information for redoing the Visual area. (closes #9455)
2022-01-01patch 8.2.3969: value of MAXCOL not available in Vim scriptv8.2.3969naohiro ono
Problem: Value of MAXCOL not available in Vim script. Solution: Add v:maxcol. (Naohiro Ono, closes #9451)
2021-12-26patch 8.2.3903: "gM" does not count tabs as expectedv8.2.3903Bram Moolenaar
Problem: "gM" does not count tabs as expected. Solution: Use linetabsize() instead of mb_string2cells(). (closes #9409)
2021-12-26patch 8.2.3900: it is not easy to use a script-local function for an optionv8.2.3900Yegappan Lakshmanan
Problem: It is not easy to use a script-local function for an option. Solution: recognize s: and <SID> at the start of the expression. (Yegappan Lakshmanan, closes #9401)
2021-12-24patch 8.2.3889: duplicate code for translating script-local function namev8.2.3889Yegappan Lakshmanan
Problem: Duplicate code for translating script-local function name. Solution: Move the code to get_scriptlocal_funcname(). (Yegappan Lakshmanan, closes #9393)
2021-12-17patch 8.2.3838: cannot use script-local function for setting *func optionsv8.2.3838Yegappan Lakshmanan
Problem: Cannot use script-local function for setting *func options. Solution: Use the script context. (Yegappan Lakshmanan, closes #9362)
2021-12-13patch 8.2.3795: too many #ifdefsv8.2.3795Bram Moolenaar
Problem: Too many #ifdefs. Solution: Graduate the jumplist feature.
2021-12-12patch 8.2.3792: setting *func options insufficiently testedv8.2.3792Yegappan Lakshmanan
Problem: Setting *func options insufficiently tested. Solution: Impove tests. (Yegappan Lakshmanan, closes #9337)
2021-12-12patch 8.2.3788: lambda for option that is a function may be freedv8.2.3788Yegappan Lakshmanan
Problem: Lambda for option that is a function may be garbage collected. Solution: Set a reference in the funcref. (Yegappan Lakshmanan, closes #9330)