comparison src/testdir/test_undo.vim @ 28835:58d2315b096e v8.2.4941

patch 8.2.4941: '[ and '] marks may be wrong after undo Commit: https://github.com/vim/vim/commit/82444cefa3fef87624a078ea86a72af7ef4ef42e Author: LemonBoy <thatlemon@gmail.com> Date: Thu May 12 15:39:31 2022 +0100 patch 8.2.4941: '[ and '] marks may be wrong after undo Problem: '[ and '] marks may be wrong after undo. Solution: Adjust the '[ and '] marks if needed. (closes https://github.com/vim/vim/issues/10407, closes https://github.com/vim/vim/issues/1281)
author Bram Moolenaar <Bram@vim.org>
date Thu, 12 May 2022 16:45:03 +0200
parents ef38fc02faaa
children b01151812350
comparison
equal deleted inserted replaced
28834:4a4e0b5939b7 28835:58d2315b096e
754 call feedkeys("uiHe\<C-O>.llo", 'xt') 754 call feedkeys("uiHe\<C-O>.llo", 'xt')
755 call assert_equal("He\ufb05llo", getline(1)) 755 call assert_equal("He\ufb05llo", getline(1))
756 bwipe! 756 bwipe!
757 endfunc 757 endfunc
758 758
759 func Test_undo_mark()
760 new
761 " The undo is applied to the only line.
762 call setline(1, 'hello')
763 call feedkeys("ggyiw$p", 'xt')
764 undo
765 call assert_equal([0, 1, 1, 0], getpos("'["))
766 call assert_equal([0, 1, 1, 0], getpos("']"))
767 " The undo removes the last line.
768 call feedkeys("Goaaaa\<Esc>", 'xt')
769 call feedkeys("obbbb\<Esc>", 'xt')
770 undo
771 call assert_equal([0, 2, 1, 0], getpos("'["))
772 call assert_equal([0, 2, 1, 0], getpos("']"))
773 bwipe!
774 endfunc
775
759 " vim: shiftwidth=2 sts=2 expandtab 776 " vim: shiftwidth=2 sts=2 expandtab