]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0807: MS-Windows: ellipsis character is garbled v9.2.0807
authorSergey Vlasov <sergey@vlasov.me>
Sun, 19 Jul 2026 15:14:02 +0000 (15:14 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 19 Jul 2026 15:14:02 +0000 (15:14 +0000)
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 <kentkt@csc.jp>
Signed-off-by: Sergey Vlasov <sergey@vlasov.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/Make_mvc.mak
src/testdir/test_textprop.vim
src/version.c

index c646f8ec3a93b593ad7b45735caab910fc6d764a..8d3bb1861f7223c18a4a468943433c485feae3ab 100644 (file)
@@ -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)
 
index 7d868ec06452ca7003f3ac449423b4c4e38f6112..66f9edc8167d7197dbe4d143778704fb7a09d6fc 100644 (file)
@@ -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
index 712e652ee9dc8b1c0056c1fd577a74b9d90d512e..84792148b35de1f3f9a1fcb2402a9119208c2f2d 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    807,
 /**/
     806,
 /**/