aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-28 06:56:08 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-03-28 06:56:18 +0800
commite4172bcbdf1c276e45e7f8688cac208d901c444c (patch)
treef52f88253bcfefb21958b7236e908e13a762c52b
parentb20fc95c1a202332d2f41181cfa6089068a0d70d (diff)
downloadrneovim-e4172bcbdf1c276e45e7f8688cac208d901c444c.tar.gz
rneovim-e4172bcbdf1c276e45e7f8688cac208d901c444c.tar.bz2
rneovim-e4172bcbdf1c276e45e7f8688cac208d901c444c.zip
vim-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: vim/vim#16990 https://github.com/vim/vim/commit/757c37da6dd99d23fed90c00e44dd65e351e19ac
-rw-r--r--test/old/testdir/test_normal.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim
index 1d9609cbe1..b8011a81e4 100644
--- a/test/old/testdir/test_normal.vim
+++ b/test/old/testdir/test_normal.vim
@@ -2705,6 +2705,22 @@ func Test_normal33_g_cmd2()
call assert_equal(87, col('.'))
call assert_equal('E', getreg(0))
+ " Have an odd number of chars in the line
+ norm! A.
+ call assert_equal(145, col('.'))
+ norm! gMyl
+ call assert_equal(73, col('.'))
+ call assert_equal('0', getreg(0))
+
+ " 'listchars' "eol" should not affect gM behavior
+ setlocal list listchars=eol:$
+ norm! $
+ call assert_equal(145, col('.'))
+ norm! gMyl
+ call assert_equal(73, col('.'))
+ call assert_equal('0', getreg(0))
+ setlocal nolist
+
" Test for gM with Tab characters
call setline('.', "\ta\tb\tc\td\te\tf")
norm! gMyl