]> granicus.if.org Git - vim/commitdiff
patch 8.2.2116: MS-Windows GUI: test for 'guifont' is incomplete v8.2.2116
authorBram Moolenaar <Bram@vim.org>
Wed, 9 Dec 2020 11:01:03 +0000 (12:01 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 9 Dec 2020 11:01:03 +0000 (12:01 +0100)
Problem:    MS-Windows GUI: test for 'guifont' is incomplete.
Solution:   Set 'renderoptions'. (Christian Brabandt)

src/testdir/test_gui.vim
src/version.c

index 6d750e0217377c051cf492ab947404fa12bc1a48..0d504d5491d79efbcd23e2a77a9e1e963a3f7aa6 100644 (file)
@@ -386,13 +386,18 @@ func Test_set_guifont()
   if has('win32')
     " Invalid font names are accepted in GTK GUI
     call assert_fails('set guifont=xa1bc23d7f', 'E596:')
+  endif
 
+  if exists('+renderoptions')
     " doing this four times used to cause a crash
-    set guifont=
-    set guifont=
-    set guifont=
-    set guifont=
-    set guifont=
+    set renderoptions=type:directx
+    for i in range(5)
+      set guifont=
+    endfor
+    set renderoptions=
+    for i in range(5)
+      set guifont=
+    endfor
   endif
 
   if has('xfontset')
index 3d48637390c31db1240d43245bd3a606598daca0..efb17f39766640ee89419f658647f2f34c92c1ba 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2116,
 /**/
     2115,
 /**/