]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0139: MS-Windows: ligatures map cleared on startup v9.1.0139
authorErik S. V. Jansson <caffeineviking@gmail.com>
Mon, 26 Feb 2024 21:23:05 +0000 (22:23 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 26 Feb 2024 21:23:05 +0000 (22:23 +0100)
Problem:  MS-Windows: ligatures map cleared on startup
Solution: Don't clear the ligatures_map, if the guiligatures
          option has already been set (Erik S. V. Jansson)

If guiligatures is set from a .vimrc it's possible
that it will be cleared on start-up (e.g. in Win32
that's what happens).

So don't clear the ligatures map if gui_set_ligatures()
has already been called (e.g. after setting 'ligatures'
from .vimrc)

closes: #14094

Signed-off-by: Erik S. V. Jansson <caffeineviking@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui.c
src/optionstr.c
src/version.c

index 78299f0454fe8382c2260e6617053f94015c869a..195369102133182485305ecb17f1cd34478f072a 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -456,7 +456,11 @@ gui_init_check(void)
     gui.prev_wrap = -1;
 
 #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
-    CLEAR_FIELD(gui.ligatures_map);
+    // Note: gui_set_ligatures() might already have been called e.g. from .vimrc,
+    // and in that case we don't want to overwrite ligatures map that has already
+    // been correctly populated (as that would lead to a cleared ligatures maps).
+    if (*p_guiligatures == NUL)
+        CLEAR_FIELD(gui.ligatures_map);
 #endif
 
 #if defined(ALWAYS_USE_GUI) || defined(VIMDLL)
index 457fccb1eb19c86b511e83a6b5b4e4b3753edf14..7f6225fd2fd68d65db83b2a4975494c181b647cb 100644 (file)
@@ -4530,7 +4530,7 @@ did_set_string_option(
                || varp == &p_guifontset        // 'guifontset'
 # endif
                || varp == &p_guifontwide       // 'guifontwide'
-# ifdef FEAT_GUI_GTK
+# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
                || varp == &p_guiligatures      // 'guiligatures'
 # endif
            )
index 8ad03e380c01413bedaacc517bf4bc94e38a6b28..07d2558e2a78d99a96f07c2521645567188f3f6c 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    139,
 /**/
     138,
 /**/