diff options
author | Erik S. V. Jansson <caffeineviking@gmail.com> | 2024-02-26 22:23:05 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-02-26 22:23:05 +0100 |
commit | 2f02638aa8f737786551c92e78ce13def3d098b2 (patch) | |
tree | 37a0517c55ebc4cdfa9145ad5cb502b8e254b875 /src/gui.c | |
parent | 02d7a6c6cfceb3faf9c98fcb7c458760cd50d269 (diff) |
patch 9.1.0139: MS-Windows: ligatures map cleared on startupv9.1.0139
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>
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |