@@ -1994,9 +1994,16 @@ func Test_normal27_bracket()
19941994 call assert_equal (5 , line (' .' ))
19951995 call assert_equal (3 , col (' .' ))
19961996
1997- " No mark after line 21, cursor moves to first non blank on current line
1997+ " No mark before line 1, cursor moves to first non-blank on current line
1998+ 1
1999+ norm! 5 |['
2000+ call assert_equal (' 1 b' , getline (' .' ))
2001+ call assert_equal (1 , line (' .' ))
2002+ call assert_equal (3 , col (' .' ))
2003+
2004+ " No mark after line 21, cursor moves to first non-blank on current line
19982005 21
1999- norm! $ ]'
2006+ norm! 5 | ]'
20002007 call assert_equal (' 21 b' , getline (' .' ))
20012008 call assert_equal (21 , line (' .' ))
20022009 call assert_equal (3 , col (' .' ))
@@ -2013,6 +2020,34 @@ func Test_normal27_bracket()
20132020 call assert_equal (20 , line (' .' ))
20142021 call assert_equal (8 , col (' .' ))
20152022
2023+ " No mark before line 1, cursor does not move
2024+ 1
2025+ norm! 5 |[`
2026+ call assert_equal (' 1 b' , getline (' .' ))
2027+ call assert_equal (1 , line (' .' ))
2028+ call assert_equal (5 , col (' .' ))
2029+
2030+ " No mark after line 21, cursor does not move
2031+ 21
2032+ norm! 5 |]`
2033+ call assert_equal (' 21 b' , getline (' .' ))
2034+ call assert_equal (21 , line (' .' ))
2035+ call assert_equal (5 , col (' .' ))
2036+
2037+ " Count too large for [`
2038+ " cursor moves to first lowercase mark
2039+ norm! 99 [`
2040+ call assert_equal (' 1 b' , getline (' .' ))
2041+ call assert_equal (1 , line (' .' ))
2042+ call assert_equal (7 , col (' .' ))
2043+
2044+ " Count too large for ]`
2045+ " cursor moves to last lowercase mark
2046+ norm! 99 ]`
2047+ call assert_equal (' 20 b' , getline (' .' ))
2048+ call assert_equal (20 , line (' .' ))
2049+ call assert_equal (8 , col (' .' ))
2050+
20162051 " clean up
20172052 bw !
20182053endfunc
0 commit comments