view src/testdir/test_ex_undo.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
line wrap: on
line source

" Tests for :undo

func Test_ex_undo()
  new ex-undo
  setlocal ul=10
  exe "normal ione\n\<Esc>"
  setlocal ul=10
  exe "normal itwo\n\<Esc>"
  setlocal ul=10
  exe "normal ithree\n\<Esc>"
  call assert_equal(4, line('$'))
  undo
  call assert_equal(3, line('$'))
  undo 1
  call assert_equal(2, line('$'))
  undo 0
  call assert_equal(1, line('$'))
  quit!
endfunc

" vim: shiftwidth=2 sts=2 expandtab