tests(commondumps): Use character counts when marking columns
Commit:
https://github.com/vim/vim/commit/e543abbf8e764d701575428461126129476e93c1
Author: Aliaksei Budavei <[email protected]>
Date: Mon May 18 19:07:08 2026 +0000
tests(commondumps): Use character counts when marking columns
Continue using "strwidth" when calculating the position of
a column of interest, and start using "setcharpos" when
marking a line of interest so that paired-up marks remain
aligned columnwise across all three parts generated by
"term_dumpdiff", especially when multibyte characters are
written in the line before the marked column.
closes: #20237
Signed-off-by: Aliaksei Budavei <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/testdir/commondumps.vim b/src/testdir/commondumps.vim
index 27d59bcdd..40206041b 100644
--- a/src/testdir/commondumps.vim
+++ b/src/testdir/commondumps.vim
@@ -10,7 +10,7 @@ enddef
def TryChangingLastJumpMark(marks: dict<list<number>>)
const pos: list<number> = get(marks, line('.'), [])
if !empty(pos)
- setpos("'`", pos)
+ setcharpos("'`", pos)
endif
enddef
@@ -56,7 +56,7 @@ def FoldAndMarkDumpDiffParts(letters: list<string>)
var marks: dict<list<number>> = {}
for idx in range(parts[1]->len())
if !empty(letters)
- setpos(("'" .. remove(letters, 0)), parts[1][idx])
+ setcharpos(("'" .. remove(letters, 0)), parts[1][idx])
endif
# Point "bs" to "cs", "cs" to "as", "as" to "cs".
marks[parts[1][idx][1]] = parts[2][idx]
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wP3Qj-00BiQK-7r%40256bit.org.