Mercurial > vim
view src/testdir/test_blockedit.vim @ 24220:a7a9176bb542 v8.2.2651
patch 8.2.2651: Vim9: restoring command modifiers happens after jump
Commit: https://github.com/vim/vim/commit/a91a71322dc2e6a1640e73b6da1f1a2f94f39a54
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 25 21:12:15 2021 +0100
patch 8.2.2651: Vim9: restoring command modifiers happens after jump
Problem: Vim9: restoring command modifiers happens after jump.
Solution: Move the restore instruction to before the jump. (closes https://github.com/vim/vim/issues/8006)
Also handle for and while.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 25 Mar 2021 21:15:04 +0100 |
parents | 08940efa6b4e |
children | bd46322bea66 |
line wrap: on
line source
" Test for block inserting func Test_blockinsert_indent() new filetype plugin indent on setlocal sw=2 et ft=vim call setline(1, ['let a=[', ' ''eins'',', ' ''zwei'',', ' ''drei'']']) call cursor(2, 3) exe "norm! \<c-v>2jI\\ \<esc>" call assert_equal(['let a=[', ' \ ''eins'',', ' \ ''zwei'',', ' \ ''drei'']'], \ getline(1,'$')) " reset to sane state filetype off bwipe! endfunc func Test_blockinsert_delete() new let _bs = &bs set bs=2 call setline(1, ['case Arg is ', ' when Name_Async,', ' when Name_Num_Gangs,', 'end if;']) exe "norm! ggjVj\<c-v>$o$A\<bs>\<esc>" "call feedkeys("Vj\<c-v>$o$A\<bs>\<esc>", 'ti') call assert_equal(["case Arg is ", " when Name_Async", " when Name_Num_Gangs,", "end if;"], \ getline(1,'$')) " reset to sane state let &bs = _bs bwipe! endfunc " vim: shiftwidth=2 sts=2 expandtab