view src/testdir/test_ex_undo.vim @ 34298:5525b635ed4a v9.1.0084

patch 9.1.0084: Visual hl wrong when it ends before multibyte 'showbreak' Commit: https://github.com/vim/vim/commit/df23d7f4bd7546f3152ea003856525591218565b Author: zeertzjq <zeertzjq@outlook.com> Date: Fri Feb 9 18:14:12 2024 +0100 patch 9.1.0084: Visual hl wrong when it ends before multibyte 'showbreak' Problem: Visual hl wrong when it ends before multibyte 'showbreak'. (lacygoil) Solution: Use vcol_sbr instead of adding n_extra. (zeertzjq) fixes: #11272 closes: #13996 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Feb 2024 18:30: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