From: Aliaksei Budavei <0x000c70@gmail.com> Date: Mon, 18 May 2026 19:07:08 +0000 (+0000) Subject: tests(commondumps): Use character counts when marking columns X-Git-Tag: v9.2.0500~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e543abbf8e764d701575428461126129476e93c1;p=thirdparty%2Fvim.git 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 <0x000c70@gmail.com> Signed-off-by: Christian Brabandt --- diff --git a/src/testdir/commondumps.vim b/src/testdir/commondumps.vim index 27d59bcdd1..40206041bd 100644 --- a/src/testdir/commondumps.vim +++ b/src/testdir/commondumps.vim @@ -10,7 +10,7 @@ enddef def TryChangingLastJumpMark(marks: dict>) const pos: list = get(marks, line('.'), []) if !empty(pos) - setpos("'`", pos) + setcharpos("'`", pos) endif enddef @@ -56,7 +56,7 @@ def FoldAndMarkDumpDiffParts(letters: list) var marks: dict> = {} 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]