summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorGary Johnson <garyjohn@spocom.com>2023-12-27 19:12:43 +0100
committerChristian Brabandt <cb@256bit.org>2023-12-27 19:12:43 +0100
commit9e6549d2fb282c45a2492ea95fe7ba54c2082c3e (patch)
tree560540448903d99f9c92924d1cbf6862dfaee29a /src/testdir
parent23627722d36b49e38ba6f8dc6bb3ebe19c98a83b (diff)
patch 9.0.2188: cursor wrong after { in single line bufferv9.0.2188
Problem: cursor wrong after { in single line buffer (Edwin Chan) Solution: do not place the cursor at the end for a single line buffer when moving backwards (Gary Johnson) closes: #13780 closes: #13783 Signed-off-by: Gary Johnson <garyjohn@spocom.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_normal.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 6b889f46b3..90bedf1800 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4164,4 +4164,21 @@ func Test_normal34_zet_large()
norm! z9765405999999999999
endfunc
+" Test for { and } paragraph movements in a single line
+func Test_brace_single_line()
+ let text =<< trim [DATA]
+ foobar one two three
+ [DATA]
+
+ new
+ call setline(1, text)
+ 1
+ norm! 0}
+
+ call assert_equal([0, 1, 20, 0], getpos('.'))
+ norm! {
+ call assert_equal([0, 1, 1, 0], getpos('.'))
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab