Skip to content

Commit 757c37d

Browse files
zeertzjqchrisbra
authored andcommitted
patch 9.1.1249: tests: no test that 'listchars' "eol" doesn't affect "gM"
Problem: No test that 'listchars' "eol" doesn't affect "gM". Solution: Add a test (zeertzjq). closes: #16990 Signed-off-by: zeertzjq <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 29d11a8 commit 757c37d

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/testdir/test_normal.vim

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2698,6 +2698,22 @@ func Test_normal33_g_cmd2()
26982698
call assert_equal(87, col('.'))
26992699
call assert_equal('E', getreg(0))
27002700

2701+
" Have an odd number of chars in the line
2702+
norm! A.
2703+
call assert_equal(145, col('.'))
2704+
norm! gMyl
2705+
call assert_equal(73, col('.'))
2706+
call assert_equal('0', getreg(0))
2707+
2708+
" 'listchars' "eol" should not affect gM behavior
2709+
setlocal list listchars=eol:$
2710+
norm! $
2711+
call assert_equal(145, col('.'))
2712+
norm! gMyl
2713+
call assert_equal(73, col('.'))
2714+
call assert_equal('0', getreg(0))
2715+
setlocal nolist
2716+
27012717
" Test for gM with Tab characters
27022718
call setline('.', "\ta\tb\tc\td\te\tf")
27032719
norm! gMyl

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
1249,
707709
/**/
708710
1248,
709711
/**/

0 commit comments

Comments
 (0)