From: Sergey Vlasov Date: Sun, 19 Jul 2026 15:14:02 +0000 (+0000) Subject: patch 9.2.0807: MS-Windows: ellipsis character is garbled X-Git-Tag: v9.2.0807^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56a5df283fc6224d97f8c2313983a3aa9d10bd2f;p=thirdparty%2Fvim.git patch 9.2.0807: MS-Windows: ellipsis character is garbled Problem: Source code is not treated as utf-8 by MSVC, so '…' character in string literal is interpreted wrong. Solution: Set utf-8 for both source and execution charsets. closes: #20755 Co-Authored-by: K.Takata Signed-off-by: Sergey Vlasov Signed-off-by: Christian Brabandt --- diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index c646f8ec3a..8d3bb1861f 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -531,7 +531,7 @@ CFLAGS = -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DHAVE_STDINT_H \ $(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) \ $(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) $(CHANNEL_DEFS) \ $(DEFINES) $(CI_CFLAGS) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ - /source-charset:utf-8 + /utf-8 RCFLAGS = -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index 7d868ec064..66f9edc816 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -3,6 +3,7 @@ CheckFeature textprop +source util/view_util.vim source util/screendump.vim import './util/vim9.vim' as v9 @@ -4991,4 +4992,39 @@ func Test_prop_find_floating_vtext() call prop_type_delete(tn) endfor endfunc + +func Test_textprop_below_truncated_with_ellipsis() + enew! + set ff=unix + + let visible_width = 20 + call NewWindow(5, visible_width) + + call setline(1, ['foo']) + + call prop_type_add('virtual_text_prop', #{highlight: 'ErrorMsg', bufnr: bufnr()}) + + let virtual_text = 'some long virtual text' + call prop_add(1, 0, #{ + \ type: 'virtual_text_prop', + \ text: virtual_text, + \ text_align: 'below', + \}) + + " virtual text should be trimmed with '…': + let expected_lines = [ + \'foo ', + \'some long virtual t…', + \'~ ', + \] + let actual_lines = ScreenLines([1, expected_lines->len()], visible_width) + call assert_equal(expected_lines, actual_lines) + + call prop_clear(1) + call prop_type_delete('virtual_text_prop', #{bufnr: bufnr()}) + only! + enew! + set ff& +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 712e652ee9..84792148b3 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 807, /**/ 806, /**/