patch 9.1.0139: MS-Windows: ligatures map cleared on startup

Commit: 
https://github.com/vim/vim/commit/2f02638aa8f737786551c92e78ce13def3d098b2
Author: Erik S. V. Jansson <[email protected]>
Date:   Mon Feb 26 22:23:05 2024 +0100

    patch 9.1.0139: MS-Windows: ligatures map cleared on startup
    
    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/gui.c b/src/gui.c
index 78299f045..195369102 100644
--- 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)
diff --git a/src/optionstr.c b/src/optionstr.c
index 457fccb1e..7f6225fd2 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -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
            )
diff --git a/src/version.c b/src/version.c
index 8ad03e380..07d2558e2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    139,
 /**/
     138,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1reiXy-003JpI-Bw%40256bit.org.

Raspunde prin e-mail lui