Mercurial > vim
comparison src/syntax.c @ 12871:1a450ce6980c v8.0.1312
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
commit https://github.com/vim/vim/commit/c3719bd87beca9f72d2e9f11e36d561c2c3b57b0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 18 22:13:31 2017 +0100
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Problem: balloon_show() only works in terminal when compiled with the GUI.
Solution: Add FEAT_BEVAL_GUI and refactor to move common code out of the GUI
specific file.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 18 Nov 2017 22:15:05 +0100 |
parents | 573f8bdeb95a |
children | 418941f0df08 |
comparison
equal
deleted
inserted
replaced
12870:0469872186f5 | 12871:1a450ce6980c |
---|---|
7559 gui_mch_new_menu_colors(); | 7559 gui_mch_new_menu_colors(); |
7560 # endif | 7560 # endif |
7561 if (gui.in_use) | 7561 if (gui.in_use) |
7562 { | 7562 { |
7563 gui_new_scrollbar_colors(); | 7563 gui_new_scrollbar_colors(); |
7564 # ifdef FEAT_BEVAL | 7564 # ifdef FEAT_BEVAL_GUI |
7565 gui_mch_new_tooltip_colors(); | 7565 gui_mch_new_tooltip_colors(); |
7566 # endif | 7566 # endif |
7567 # ifdef FEAT_MENU | 7567 # ifdef FEAT_MENU |
7568 gui_mch_new_menu_font(); | 7568 gui_mch_new_menu_font(); |
7569 # endif | 7569 # endif |
8013 if (is_scrollbar_group && gui.scroll_fg_pixel != i) | 8013 if (is_scrollbar_group && gui.scroll_fg_pixel != i) |
8014 { | 8014 { |
8015 gui.scroll_fg_pixel = i; | 8015 gui.scroll_fg_pixel = i; |
8016 do_colors = TRUE; | 8016 do_colors = TRUE; |
8017 } | 8017 } |
8018 # ifdef FEAT_BEVAL | 8018 # ifdef FEAT_BEVAL_GUI |
8019 if (is_tooltip_group && gui.tooltip_fg_pixel != i) | 8019 if (is_tooltip_group && gui.tooltip_fg_pixel != i) |
8020 { | 8020 { |
8021 gui.tooltip_fg_pixel = i; | 8021 gui.tooltip_fg_pixel = i; |
8022 do_colors = TRUE; | 8022 do_colors = TRUE; |
8023 } | 8023 } |
8064 if (is_scrollbar_group && gui.scroll_bg_pixel != i) | 8064 if (is_scrollbar_group && gui.scroll_bg_pixel != i) |
8065 { | 8065 { |
8066 gui.scroll_bg_pixel = i; | 8066 gui.scroll_bg_pixel = i; |
8067 do_colors = TRUE; | 8067 do_colors = TRUE; |
8068 } | 8068 } |
8069 # ifdef FEAT_BEVAL | 8069 # ifdef FEAT_BEVAL_GUI |
8070 if (is_tooltip_group && gui.tooltip_bg_pixel != i) | 8070 if (is_tooltip_group && gui.tooltip_bg_pixel != i) |
8071 { | 8071 { |
8072 gui.tooltip_bg_pixel = i; | 8072 gui.tooltip_bg_pixel = i; |
8073 do_colors = TRUE; | 8073 do_colors = TRUE; |
8074 } | 8074 } |
8250 else if (is_scrollbar_group) | 8250 else if (is_scrollbar_group) |
8251 { | 8251 { |
8252 if (gui.in_use && do_colors) | 8252 if (gui.in_use && do_colors) |
8253 gui_new_scrollbar_colors(); | 8253 gui_new_scrollbar_colors(); |
8254 } | 8254 } |
8255 # ifdef FEAT_BEVAL | 8255 # ifdef FEAT_BEVAL_GUI |
8256 else if (is_tooltip_group) | 8256 else if (is_tooltip_group) |
8257 { | 8257 { |
8258 if (gui.in_use && do_colors) | 8258 if (gui.in_use && do_colors) |
8259 gui_mch_new_tooltip_colors(); | 8259 gui_mch_new_tooltip_colors(); |
8260 } | 8260 } |
8429 # ifdef FEAT_MENU | 8429 # ifdef FEAT_MENU |
8430 gui_mch_new_menu_colors(); | 8430 gui_mch_new_menu_colors(); |
8431 # endif | 8431 # endif |
8432 must_redraw = CLEAR; | 8432 must_redraw = CLEAR; |
8433 } | 8433 } |
8434 # ifdef FEAT_BEVAL | 8434 # ifdef FEAT_BEVAL_GUI |
8435 if (set_group_colors((char_u *)"Tooltip", | 8435 if (set_group_colors((char_u *)"Tooltip", |
8436 &gui.tooltip_fg_pixel, &gui.tooltip_bg_pixel, | 8436 &gui.tooltip_fg_pixel, &gui.tooltip_bg_pixel, |
8437 FALSE, FALSE, TRUE)) | 8437 FALSE, FALSE, TRUE)) |
8438 { | 8438 { |
8439 # ifdef FEAT_TOOLBAR | 8439 # ifdef FEAT_TOOLBAR |
8671 /* YIKES! This is a bug waiting to crash the program */ | 8671 /* YIKES! This is a bug waiting to crash the program */ |
8672 gui.menu_font = HL_TABLE()[idx].sg_fontset; | 8672 gui.menu_font = HL_TABLE()[idx].sg_fontset; |
8673 # endif | 8673 # endif |
8674 gui_mch_new_menu_font(); | 8674 gui_mch_new_menu_font(); |
8675 } | 8675 } |
8676 # ifdef FEAT_BEVAL | 8676 # ifdef FEAT_BEVAL_GUI |
8677 if (do_tooltip) | 8677 if (do_tooltip) |
8678 { | 8678 { |
8679 /* The Athena widget set cannot currently handle switching between | 8679 /* The Athena widget set cannot currently handle switching between |
8680 * displaying a single font and a fontset. | 8680 * displaying a single font and a fontset. |
8681 * If the XtNinternational resource is set to True at widget | 8681 * If the XtNinternational resource is set to True at widget |