Skip to content

tests(commondumps): Use character counts when marking columns#20237

Closed
zzzyxwvut wants to merge 1 commit into
vim:masterfrom
zzzyxwvut:commondumps/20260518
Closed

tests(commondumps): Use character counts when marking columns#20237
zzzyxwvut wants to merge 1 commit into
vim:masterfrom
zzzyxwvut:commondumps/20260518

Conversation

@zzzyxwvut
Copy link
Copy Markdown
Contributor

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.

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.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
@zzzyxwvut
Copy link
Copy Markdown
Contributor Author

We can see the result of counting column positions in bytes
(rather than characters) and falling short of mark alignment
between multibyte and ASCII lines with this example routine:

cd runtime/syntax
git switch --detach v9.2.0498
git revert --no-edit -Xours f7e239bd0
make clean sh_functions_bash.sh test
../../src/vim --clean -S testdir/viewdumps.vim

# :normal `a
# :normal ``
# :normal ``

@chrisbra
Copy link
Copy Markdown
Member

thanks

@chrisbra chrisbra closed this in e543abb May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants