[vim/vim] Escape '…' ellipsis character in source code (PR #20755)

2 views
Skip to first unread message

Sergey Vlasov

unread,
3:24 PM (6 hours ago) 3:24 PM
to vim/vim, Subscribed
Problem:  Source code is not treated as utf-8 by MSVC, so '…'
          character in string literal is interpreted wrong.
Solution: Replace '…' in source code with octal escape sequence.

Example of breakage https://github.com/noscript/vim/actions/runs/29205020293:

Failures: 
	From test_textprop.vim:
	Found errors in Test_textprop_below_truncated_with_ellipsis():
	command line..script D:/a/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_textprop_below_truncated_with_ellipsis line 25: Expected ['foo                 ', 'some long virtual t…', '~                   '] but got ['foo                 ', 'some long virtua�   ', '~                   ']

where "…" is not interpreted properly and its byte length is also wrong, causing garbage in rendering.

The problem is probably bigger than the fix addresses, but I don't have Windows environment and have no opportunity to experiment.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20755

Commit Summary

  • 8c2698b escape '…' ellipsis character in source code

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20755@github.com>

h_east

unread,
3:53 PM (5 hours ago) 3:53 PM
to vim/vim, Subscribed
h-east left a comment (vim/vim#20755)
Problem:  Source code is not treated as utf-8 by MSVC, so '…'
          character in string literal is interpreted wrong.

Hmm? The file displays correctly in VS Code.

I don't think this is the right solution.
Isn't it possible that some other issue is causing this?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20755/c4952542314@github.com>

Sergey Vlasov

unread,
4:01 PM (5 hours ago) 4:01 PM
to vim/vim, Subscribed
noscript left a comment (vim/vim#20755)

It's not about displaying the source code. I suppose if you run the portion of the test in vim compiled by MSVC, you should also see garbage when virtual text is trimmed with ellipsis.

Maybe MSVC needs some flag to treat source files as utf-8, I am not really sure.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20755/c4952565632@github.com>

Reply all
Reply to author
Forward
0 new messages