Mercurial > vim
comparison src/gui.c @ 34436:506b04337541 v9.1.0139
patch 9.1.0139: MS-Windows: ligatures map cleared on startup
Commit: https://github.com/vim/vim/commit/2f02638aa8f737786551c92e78ce13def3d098b2
Author: Erik S. V. Jansson <caffeineviking@gmail.com>
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 <caffeineviking@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 26 Feb 2024 22:30:02 +0100 |
parents | c5a945f7f3da |
children |
comparison
equal
deleted
inserted
replaced
34435:be1c5d0cbb2f | 34436:506b04337541 |
---|---|
454 | 454 |
455 gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH; | 455 gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH; |
456 gui.prev_wrap = -1; | 456 gui.prev_wrap = -1; |
457 | 457 |
458 #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) | 458 #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) |
459 CLEAR_FIELD(gui.ligatures_map); | 459 // Note: gui_set_ligatures() might already have been called e.g. from .vimrc, |
460 // and in that case we don't want to overwrite ligatures map that has already | |
461 // been correctly populated (as that would lead to a cleared ligatures maps). | |
462 if (*p_guiligatures == NUL) | |
463 CLEAR_FIELD(gui.ligatures_map); | |
460 #endif | 464 #endif |
461 | 465 |
462 #if defined(ALWAYS_USE_GUI) || defined(VIMDLL) | 466 #if defined(ALWAYS_USE_GUI) || defined(VIMDLL) |
463 result = OK; | 467 result = OK; |
464 #else | 468 #else |