changeset 23140:ecc6bcc644b7 v8.2.2116

patch 8.2.2116: MS-Windows GUI: test for 'guifont' is incomplete Commit: https://github.com/vim/vim/commit/2c78a772fdb5f6a16d16a47e7f218051c4dcb845 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 9 12:01:03 2020 +0100 patch 8.2.2116: MS-Windows GUI: test for 'guifont' is incomplete Problem: MS-Windows GUI: test for 'guifont' is incomplete. Solution: Set 'renderoptions'. (Christian Brabandt)
author Bram Moolenaar <Bram@vim.org>
date Wed, 09 Dec 2020 12:15:04 +0100
parents 16c389f56603
children a166b1a0cb41
files src/testdir/test_gui.vim src/version.c
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -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')
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2116,
+/**/
     2115,
 /**/
     2114,