Mercurial > vim
comparison src/gui.c @ 29320:a74398c432a4 v9.0.0003
patch 9.0.0003: functions are global while they could be local
Commit: https://github.com/vim/vim/commit/ee47eaceaa148e07b566ff420f9a3c2edde2fa34
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Wed Jun 29 12:55:36 2022 +0100
patch 9.0.0003: functions are global while they could be local
Problem: Functions are global while they could be local.
Solution: Add "static". Add a few tests. (Yegappan Lakshmanan,
closes #10612)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 Jun 2022 14:00:03 +0200 |
parents | 87ad2de4fe41 |
children | 60977de70684 |
comparison
equal
deleted
inserted
replaced
29319:0f3ce048146b | 29320:a74398c432a4 |
---|---|
30 #endif | 30 #endif |
31 static void gui_do_scrollbar(win_T *wp, int which, int enable); | 31 static void gui_do_scrollbar(win_T *wp, int which, int enable); |
32 static void gui_update_horiz_scrollbar(int); | 32 static void gui_update_horiz_scrollbar(int); |
33 static void gui_set_fg_color(char_u *name); | 33 static void gui_set_fg_color(char_u *name); |
34 static void gui_set_bg_color(char_u *name); | 34 static void gui_set_bg_color(char_u *name); |
35 static void init_gui_options(void); | |
35 static win_T *xy2win(int x, int y, mouse_find_T popup); | 36 static win_T *xy2win(int x, int y, mouse_find_T popup); |
36 | 37 |
37 #ifdef GUI_MAY_FORK | 38 #ifdef GUI_MAY_FORK |
38 static void gui_do_fork(void); | 39 static void gui_do_fork(void); |
39 | 40 |
1393 gui.highlight_mask = old_hl_mask; | 1394 gui.highlight_mask = old_hl_mask; |
1394 } | 1395 } |
1395 } | 1396 } |
1396 | 1397 |
1397 #if defined(FEAT_MENU) || defined(PROTO) | 1398 #if defined(FEAT_MENU) || defined(PROTO) |
1398 void | 1399 static void |
1399 gui_position_menu(void) | 1400 gui_position_menu(void) |
1400 { | 1401 { |
1401 # if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MOTIF) | 1402 # if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MOTIF) |
1402 if (gui.menu_is_active && gui.in_use) | 1403 if (gui.menu_is_active && gui.in_use) |
1403 gui_mch_set_menu_pos(0, 0, gui.menu_width, gui.menu_height); | 1404 gui_mch_set_menu_pos(0, 0, gui.menu_width, gui.menu_height); |
4813 } | 4814 } |
4814 | 4815 |
4815 /* | 4816 /* |
4816 * Option initializations that can only be done after opening the GUI window. | 4817 * Option initializations that can only be done after opening the GUI window. |
4817 */ | 4818 */ |
4818 void | 4819 static void |
4819 init_gui_options(void) | 4820 init_gui_options(void) |
4820 { | 4821 { |
4821 // Set the 'background' option according to the lightness of the | 4822 // Set the 'background' option according to the lightness of the |
4822 // background color, unless the user has set it already. | 4823 // background color, unless the user has set it already. |
4823 if (!option_was_set((char_u *)"bg") && STRCMP(p_bg, gui_bg_default()) != 0) | 4824 if (!option_was_set((char_u *)"bg") && STRCMP(p_bg, gui_bg_default()) != 0) |