summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_normal.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-26 15:00:07 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-26 15:00:07 +0000
commit71c41255f6a074c4df4dc6f9e97d347e565253a1 (patch)
tree147088eef2978684982cd3db6993e36722e6f69c /src/testdir/test_normal.vim
parent9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 (diff)
patch 8.2.3903: "gM" does not count tabs as expectedv8.2.3903
Problem: "gM" does not count tabs as expected. Solution: Use linetabsize() instead of mb_string2cells(). (closes #9409)
Diffstat (limited to 'src/testdir/test_normal.vim')
-rw-r--r--src/testdir/test_normal.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 6458a1bed4..9794961337 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -2580,7 +2580,15 @@ func Test_normal33_g_cmd2()
call assert_equal(87, col('.'))
call assert_equal('E', getreg(0))
+ " Test for gM with Tab characters
+ call setline('.', "\ta\tb\tc\td\te\tf")
+ norm! gMyl
+ call assert_equal(6, col('.'))
+ call assert_equal("c", getreg(0))
+
" Test for g Ctrl-G
+ call setline('.', lineC)
+ norm! 60gMyl
set ff=unix
let a=execute(":norm! g\<c-g>")
call assert_match('Col 87 of 144; Line 2 of 2; Word 1 of 1; Byte 88 of 146', a)