aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_edit.vim
Commit message (Collapse)AuthorAge
* vim-patch:9.2.1054: Virtual Replace mode: BS over multi-byte text eats the ↵zeertzjq2026-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | padding (#41799) Problem: In Virtual Replace mode, backspacing over a character that replaced several multi-byte characters deletes the padding that follows it, so the text after the cursor loses its alignment. Solution: In replace_do_bs() advance by the length of the character at the current offset instead of always measuring the first restored character (Volodymyr Chernetskyi). After the original characters are restored, replace_do_bs() adds up their screen width so it knows how much of the alignment padding to drop again. The loop advanced "i" by mb_ptr2len(p) - 1, which always returns the length of the *first* restored character rather than the length of the character at the offset being looked at. One backspace can restore more than one character, because a wide character may have replaced several narrow ones. When those characters do not all have the same byte length the index lands in the middle of a character: chartabsize() then measures a trailing byte, counts it as an unprintable <xx> worth four cells, and the inflated width makes the following loop delete padding spaces that should have been kept. call setline(1, 'aé xyz') call feedkeys("gR\u4e00\<BS>\e", 'xt') leaves "aéxyz" instead of restoring the original line. Going the other way round ('éa') happens to work, since there the first character is the longer one. This has been wrong since the loop was added in Vim 7.0. closes: vim/vim#21211 https://github.com/vim/vim/commit/5d934b1bdb803c652a521f04481f92b2c2fa029e Co-authored-by: Volodymyr Chernetskyi <19735328+chernetskyi@users.noreply.github.com>
* vim-patch:9.2.0827: :startinsert enters Insert mode in a non-modifiable ↵zeertzjq2026-07-22
| | | | | | | | | | | | | | | | | | | buffer (#40906) Problem: ":startinsert" enters Insert mode in a buffer where 'modifiable' is off, the error only appears when a character is typed. Typing "i" gives the error right away (Barrett Ruth) Solution: Give the error when the buffer is not modifiable, like "i" does. Keep ignoring the command in a terminal window, where ":startinsert" is documented to be ineffective, and keep accepting it when 'insertmode' is set, like "i" does (Hirohito Higashi). fixes: vim/vim#20804 closes: vim/vim#20806 https://github.com/vim/vim/commit/6ab1976e49135c0d03b06e3cddd26dc86edff085 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.2.0392: tests: Some tests are flakyzeertzjq2026-07-02
| | | | | | | | | | | Problem: tests: Some tests are flaky and cause CI to fail Solution: Add WaitForAsserts() calls to reduce flakiness closes: vim/vim#20050 https://github.com/vim/vim/commit/1940bcb243984a2586a4b0b8efb3a8728f6a5b54 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.2.0549: Cursor wrong after autoindent strip is skipped (#40041)zeertzjq2026-05-29
| | | | | | | | | | | | | | Problem: cursor lands on the wrong line when a <Cmd> mapping or autocmd modifies lines during insert and the strip is skipped (after v9.2.0510) Solution: Restore cursor to tpos when skipwhite skips the strip, instead of leaving it at end_insert_pos (glepnir). related: vim/vim#20290 closes: vim/vim#20332 https://github.com/vim/vim/commit/179f9efc7ec49f7fb9965d86734973bdac135870 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.2.0533: '[ mark moved to end of inserted text after CTRL-R ↵zeertzjq2026-05-26
| | | | | | | | | | | | | | | | | | | | | | | | CTRL-P paste Problem: After CTRL-R CTRL-P (or CTRL-R CTRL-O) pastes a register into Insert mode, a follow-up edit such as backspace makes stop_arrow() rewrite Insstart with the post-paste cursor position. As a result the '[ mark points at the end of the inserted text instead of its start (agguser, after 9.2.0384) Solution: In stop_arrow(), only pull Insstart back when the cursor moved above the previous Insstart, so a line-start backspace can still save the joined range (vim/vim#20031) without disturbing the start position for inserts that advance the cursor (Hirohito Higashi). related: vim/vim#20031 fixes: vim/vim#20130 closes: vim/vim#20322 https://github.com/vim/vim/commit/bc7805323f54405e2e746efde3901b0b6aefe6ff Co-authored-by: Hirohito Higashi <h.east.727@gmail.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* vim-patch:9.2.0510: setline() mapping may trigger autoindent (#39961)zeertzjq2026-05-23
| | | | | | | | | | | | | Problem: setline() insert mode mapping may trigger autoindent, corrupting the newly inserted line content (Evgeni Chasnovski) Solution: Only strip autoindent whitespace when the rest of the line is all whitespace (glepnir). fixes: vim/vim#19363 closes: vim/vim#20290 https://github.com/vim/vim/commit/e3dedac77b2076210e7027b14a5927622434f014 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.2.0036: completion: thesaurus completion incorrect with ↵zeertzjq2026-02-21
| | | | | | | | | | | | | | | "longest/fuzzy" (#37996) Problem: completion: thesaurus completion incorrect with "longest/fuzzy" (Mao-Yining) Solution: Disable fuzzy matching and longest-match insertion specifically for thesaurus completion (Girish Palya). fixes: vim/vim#19356 closes: vim/vim#19475 https://github.com/vim/vim/commit/26a3f486cc708b285b20e92c206f1615d20b23b6 Co-authored-by: Girish Palya <girishji@gmail.com>
* vim-patch:9.1.2130: Page scrolling in Insert mode beeps (#37710)zeertzjq2026-02-04
| | | | | | | | | | | Problem: Page scrolling in Insert mode beeps (after 9.1.0211). Solution: Fix incorrect return value of pagescroll(). Also invert the return value of scroll_with_sms() to be less confusing and match comments (zeertzjq). fixes: vim/vim#19326 closes: vim/vim#19327 https://github.com/vim/vim/commit/a8ce914db16898de47ff270f3c19e6683012dff8
* vim-patch:9.1.1370: CI Tests favor GTK2 over GTK3zeertzjq2026-01-24
| | | | | | | | | | | | | | | Problem: CI Tests favor GTK2 over GTK3 Solution: Install GTK3 dependencies and debug packages for CI workflows, update ASAN suppression list, update required dependency checks for the tests (Drew Vogel) closes: vim/vim#17253 https://github.com/vim/vim/commit/ea67ba718d8af10cb7aa3b91379203f5dd7e50d7 Cherry-pick test_match.vim changes from patch 9.0.0626. Co-authored-by: Drew Vogel <dvogel@github>
* vim-patch:9.1.1325: tests: not checking error numbers properlyzeertzjq2026-01-20
| | | | | | | | | | Problem: tests: not checking error numbers properly. Solution: Add a trailing comma to avoid matching a different error number with the same prefix (zeertzjq) closes: vim/vim#17159 https://github.com/vim/vim/commit/67fe77d2724ec2041baef73edf20e828b43adcd2
* vim-patch:9.1.1859: completion: whitespace not cleared with 'ai' (#36218)zeertzjq2025-10-17
| | | | | | | | | | | | Problem: completion: whitespace not cleared with 'ai' Solution: Remove spaces added by 'autoindent' when autocomplete is set and restore did_ai in ins_compl_start() (Maxim Kim) fixes vim/vim#18560 closes: vim/vim#18582 https://github.com/vim/vim/commit/6180d65751d8cc85460eb1729dd04815b9f14aa4 Co-authored-by: Maxim Kim <habamax@gmail.com>
* vim-patch:9.1.1790: completion: Enter does not insert match with "noinsert" ↵zeertzjq2025-09-25
| | | | | | | | | | | | | | (#35917) Problem: completion: Enter does not insert match with "noinsert". (Sergey Vlasov) Solution: Check for compl_shown_match instead of compl_selected_item (zeertzjq). fixes: vim/vim#18386 related: vim/vim#1653 closes: vim/vim#18395 https://github.com/vim/vim/commit/ef818ae4448726b91c31e24406a554686dea19f5
* vim-patch:9.1.1702: tests: test_edit still fails on CIzeertzjq2025-08-28
| | | | | | | | | | Problem: tests: test_edit still fails on CI (after v9.1.1701) Solution: Fix the skip condition https://github.com/vim/vim/commit/42acf736a34904e4c030f9c164f41717bde96427 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1701: tests: failure on CI with GUI and ASAN in test_edit.reszeertzjq2025-08-28
| | | | | | | | | | | | | Problem: tests: failure on CI with GUI and ASAN in test_edit.res (Hirohito Higashi) Solution: Disable the test for that specific situation in CI, close swapfiles fixes: vim/vim#18070 https://github.com/vim/vim/commit/6c14c4625b99fab98ae3836d4f12e35c7aefa51a Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1511: tests: two edit tests change v:testing from 1 to 0zeertzjq2025-07-06
| | | | | | | | | | Problem: tests: two edit tests change v:testing from 1 to 0. Solution: Don't change v:testing in these two tests, since it's already set to 1 in runtest.vim (zeertzjq). closes: vim/vim#17660 https://github.com/vim/vim/commit/96076bf41e0163cd61ca738b352896d450ee3636
* test(old): emulate test_override('char_avail') using FFIzeertzjq2025-07-04
| | | | | Add a non-static variable for this, otherwise it'll be really hacky. This avoid having to rewrite many incsearch tests in Lua.
* vim-patch:9.1.1221: Wrong cursor pos when leaving Insert mode just after ↵zeertzjq2025-03-18
| | | | | | | | | | | | | | 'autoindent' (#32976) Problem: Wrong cursor position and '^' mark when leaving Insert mode just after 'autoindent' and cursor on last char of line. Solution: Don't move cursor to NUL when it wasn't moved to the left (zeertzjq). fixes: vim/vim#15581 related: neovim/neovim#30165 neovim/neovim#32943 closes: vim/vim#16922 https://github.com/vim/vim/commit/a3a7d10bfb9547991e04bcf12d1391deb8060754
* vim-patch:9.1.1126: patch 9.1.1121 used a wrong way to handle enterzeertzjq2025-02-21
| | | | | | | | | | | | Problem: patch 9.1.1121 used a wrong way to handle enter Solution: compl_enter_selects also needs to consider the selected item in ins_compl_new_leader() (glepnir) closes: vim/vim#16673 https://github.com/vim/vim/commit/44180416981000ad0bc5db4686889892e7a05cdd Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1121: Enter does not insert newline with "noselect"glepnir2025-02-21
| | | | | | | | | | | | | | | Problem: Enter does not insert newline with "noselect" when the pum is visible (lifepillar) Solution: When Enter is pressed and no complete-item is selected, ins_compl_prep returns false, and the edit function continues processing Enter to insert a new line. (glepnir) fixes: vim/vim#1653 closes: vim/vim#16653 https://github.com/vim/vim/commit/07f0dbe3aa326fdf4d0f1b1cf7d79df89e91fc6e Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.0.0532: edit test is flaky when run under valgrind (#32518)zeertzjq2025-02-19
| | | | | | | | | | Problem: Edit test is flaky when run under valgrind. Solution: Send some text to the terminal to trigger a redraw. https://github.com/vim/vim/commit/14f91765c07e147e0c8554a50560ae24dbd5ecea Cherry-pick Test_edit_shift_bs() from patch 8.2.4876. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(build): remove USE_FNAME_CASE, redundant with CASE_INSENSITIVE_FILENAMEbfredl2024-10-11
| | | | | It stands to reason, you need to "fix" case-insensitive filenames if-and-only-if you have case-insensitive filenames.
* vim-patch:9.1.0415: Some functions are not testedzeertzjq2024-07-31
| | | | | | | | | | | | Problem: Some functions are not tested Solution: Add a few more tests, fix a few minor problems (Yegappan Lakshmanan) closes: vim/vim#14789 https://github.com/vim/vim/commit/fe424d13ef6e5486923f23f15bb6951e3079412e Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.1257: code style is not check in test scriptszeertzjq2024-07-18
| | | | | | | | | | | Problem: Code style is not check in test scripts. Solution: Add basic code style check for test files. https://github.com/vim/vim/commit/94722c510745a0cfd494c51625a514b92dd2bfb2 Use Test_test_files() from latest Vim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.0329: String interpolation fails for Dict type (#28335)zeertzjq2024-04-15
| | | | | | | | | | | | | Problem: String interpolation fails for Dict type Solution: Support Dict data type properly, also support :put =Dict (without having to convert it to string() first) (Yegappan Lakshmanan) fixes: vim/vim#14529 closes: vim/vim#14541 https://github.com/vim/vim/commit/f01493c55062c01b1cdf9b1e946577f4d1bdddf3 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.1.0258: half-page scrolling broke backward compatibilityLuuk van Baal2024-04-08
| | | | | | | | | | | Problem: Support for 'smoothscroll' in (half-)page scrolling broke backward compatibility and can be made to work better. (after v9.1.215) Solution: Restore the previous cursor and end-of-buffer behavior for half-page scrolling and improve 'smoothscroll' support. (Luuk van Baal) https://github.com/vim/vim/commit/cb204e688e5c9d56a78b621ef27c35d91860cb09
* Merge pull request #28044 from luukvbaal/vim-9.1.0211zeertzjq2024-03-28
|\ | | | | vim-patch:9.1.{0211,0215}
| * vim-patch:9.1.0215: Half-page scrolling does not support smooth-scrollingLuuk van Baal2024-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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) https://github.com/vim/vim/commit/5a2e3ec9ac72b6e644fea4ebba7e632498296e2f
| * vim-patch:9.1.0211: page-wise scrolling does not support smooth-scrollingLuuk van Baal2024-03-28
| | | | | | | | | | | | | | | | | | | | | | 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. https://github.com/vim/vim/commit/b9f5b95b7bec2414a5a96010514702d99afea18e
* | vim-patch:9.1.0218: Unnecessary multiplications in backspace code (#28075)zeertzjq2024-03-28
|/ | | | | | | | | | | | Problem: Unnecessary multiplications in backspace code, as "col / ts * ts" is the same as "col - col % ts". Solution: Change "col / ts * ts" to "col - col % ts". Adjust the loop and the comments ins_bs() to be easier to understand. Update tests to reset 'smarttab' properly. (zeertzjq) closes: vim/vim#14308 https://github.com/vim/vim/commit/8ede7a069419e0e01368c65a2d0c79d6332aa6cd
* vim-patch:9.1.0204: Backspace inserts spaces with virtual text and ↵zeertzjq2024-03-26
| | | | | | | | | | | | | | 'smarttab' (#28032) Problem: Backspace inserts spaces with virtual text and 'smarttab'. Solution: Ignore virtual text and wrapping when backspacing. (zeertzjq) related: neovim/neovim#28005 closes: vim/vim#14296 https://github.com/vim/vim/commit/0185c7701434f1fbbf83fecd6384a19c1d2fc44e Co-authored-by: VanaIgr <vanaigranov@gmail.com>
* vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre (#27049)altermo2024-01-17
| | | | | | | | | | | | | | * vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre Problem: i_CTRL-] triggers InsertCharPre Solution: Return if CTRL-] is received. InsertCharPre is supposed to be only used for chars to be inserted but i_CTRL-] triggers expansion and is not inserted into the buffer (altermo) closes: vim/vim#13853 closes: vim/vim#13864 https://github.com/vim/vim/commit/7d711fe2092d0438d2df5054df735ec34926e2bc
* vim-patch:8.1.2373: cannot build with +popupwin but without +quickfixzeertzjq2023-11-13
| | | | | | | | | Problem: Cannot build with +popupwin but without +quickfix. (John Marriott) Solution: Adjust #ifdefs. https://github.com/vim/vim/commit/5a4c3082d7ab51b3d448a91578479c96c1ab0ad3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0336: tests are flaky because of using a common file namezeertzjq2023-11-13
| | | | | | | | | | | | | Problem: Tests are flaky because of using a common file name. Solution: Rename files and directories to be more unique. https://github.com/vim/vim/commit/61abe7d8f827ec31f098e8abcdf58846b956ef16 Cherry-pick Test_custom_complete_autoload() from patch 8.2.4584. Cherry-pick test_delete.vim & test_edit.vim changes from patch 9.0.0323. Cherry-pick test_edit.vim changes from patch 8.2.3637. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:partial:9.0.1886: Various Typoszeertzjq2023-09-09
| | | | | | | | | | | | | | | | | | | Problem: Various Typos Solution: Fix Typos This is a collection of typo related commits. closes: vim/vim#12753 closes: vim/vim#13016 https://github.com/vim/vim/commit/ee17b6f70d382ec6c5d8d27b56c4e84106ac8c55 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl> 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>
* test(old): reorder test_edit.vim to match upstream (#24837)zeertzjq2023-08-22
|
* vim-patch:9.0.1428: cursor in wrong position when leaving insert mode (#22786)zeertzjq2023-03-26
| | | | | | | | | Problem: Cursor in wrong position when leaving insert mode. Solution: Update the w_valid flags. Position the cursor also when not redrawing. (closes vim/vim#12137) https://github.com/vim/vim/commit/c174c2e58c9e24a75b189e01143e6d057b84e96e Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test: move oldtests to test directory (#22536)dundargoc2023-03-07
The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'.