diff src/testdir/test_textformat.vim @ 28982:5478246aa14b v8.2.5013

patch 8.2.5013: after text formatting cursor may be in an invalid position Commit: https://github.com/vim/vim/commit/78d52883e10d71f23ab72a3d8b9733b00da8c9ad Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 24 13:57:54 2022 +0100 patch 8.2.5013: after text formatting cursor may be in an invalid position Problem: After text formatting the cursor may be in an invalid position. Solution: Correct the cursor position after formatting.
author Bram Moolenaar <Bram@vim.org>
date Tue, 24 May 2022 15:00:04 +0200
parents 864fa5276e78
children 58416c1d1b94
line wrap: on
line diff
--- a/src/testdir/test_textformat.vim
+++ b/src/testdir/test_textformat.vim
@@ -1291,4 +1291,16 @@ func Test_fo_2()
   close!
 endfunc
 
+" This was leaving the cursor after the end of a line.  Complicated way to
+" have the problem show up with valgrind.
+func Test_correct_cursor_position()
+  set encoding=iso8859
+  new
+  norm a000“0
+  sil! norm gggg0i0gw0gg
+
+  bwipe!
+  set encoding=utf8
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab