diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-04-04 15:16:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-04 15:16:54 +0100 |
commit | 4829c1c9e9095a3303caec9af7d02f6547f6df0e (patch) | |
tree | 2b3819cd2ea17b652ba29f3a8a6ea9945ec6c4bb /src/highlight.c | |
parent | 7a411a306f90339d8686e42ac16e1ae4fc7533c5 (diff) | |
download | vim-git-4829c1c9e9095a3303caec9af7d02f6547f6df0e.tar.gz |
patch 8.2.4683: verbose check with dict_find() to see if a key is presentv8.2.4683
Problem: Verbose check with dict_find() to see if a key is present.
Solution: Add dict_has_key(). (Yegappan Lakshmanan, closes #10074)
Diffstat (limited to 'src/highlight.c')
-rw-r--r-- | src/highlight.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/highlight.c b/src/highlight.c index 6add298b0..724c4ba8d 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -718,7 +718,7 @@ highlight_reset_all(void) # ifdef FEAT_BEVAL_TIP gui_init_tooltip_font(); # endif -# if defined(FEAT_MENU) && (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) +# if defined(FEAT_MENU) && defined(FEAT_GUI_MOTIF) gui_init_menu_font(); # endif } @@ -2134,7 +2134,7 @@ hl_do_font( || do_menu # endif # ifdef FEAT_BEVAL_TIP - // In Athena & Motif, the Tooltip highlight group is always a fontset + // In Motif, the Tooltip highlight group is always a fontset || do_tooltip # endif ) @@ -2156,7 +2156,7 @@ hl_do_font( // fontset. Same for the Menu group. if (do_normal) gui_init_font(arg, TRUE); -# if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) && defined(FEAT_MENU) +# if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU) if (do_menu) { # ifdef FONTSET_ALWAYS @@ -2170,7 +2170,7 @@ hl_do_font( # ifdef FEAT_BEVAL_GUI if (do_tooltip) { - // The Athena widget set cannot currently handle switching between + // The Athena widget set could not handle switching between // displaying a single font and a fontset. // If the XtNinternational resource is set to True at widget // creation, then a fontset is always used, otherwise an @@ -2194,7 +2194,7 @@ hl_do_font( if (do_normal) gui_init_font(arg, FALSE); #ifndef FONTSET_ALWAYS -# if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) && defined(FEAT_MENU) +# if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU) if (do_menu) { gui.menu_font = HL_TABLE()[idx].sg_font; @@ -4411,7 +4411,7 @@ hlg_add_or_update(dict_T *dict) if (dict_get_bool(dict, (char_u *)"default", VVAL_FALSE) == VVAL_TRUE) dodefault = TRUE; - if (dict_find(dict, (char_u *)"cleared", -1) != NULL) + if (dict_has_key(dict, "cleared")) { varnumber_T cleared; @@ -4425,7 +4425,7 @@ hlg_add_or_update(dict_T *dict) } } - if (dict_find(dict, (char_u *)"linksto", -1) != NULL) + if (dict_has_key(dict, "linksto")) { char_u *linksto; |