4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Changing GUI options causes an unnecessary redraw when the GUI
13 Solution: Avoid the redraw. (Lech Lorens)
17 *** ../vim-7.2.098/src/option.c Wed Dec 24 12:53:33 2008
18 --- src/option.c Wed Feb 4 16:59:56 2009
22 int did_chartab = FALSE;
24 long_u free_oldval = (options[opt_idx].flags & P_ALLOCED);
26 + /* set when changing an option that only requires a redraw in the GUI */
27 + int redraw_gui_only = FALSE;
30 /* Get the global option to compare with, otherwise we would have to check
31 * two values for all local options. */
35 errmsg = (char_u *)N_("E596: Invalid font(s)");
38 + redraw_gui_only = TRUE;
41 else if (varp == &p_guifontset)
45 errmsg = (char_u *)N_("E597: can't select fontset");
46 else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
47 errmsg = (char_u *)N_("E598: Invalid fontset");
48 + redraw_gui_only = TRUE;
55 errmsg = (char_u *)N_("E533: can't select wide font");
56 else if (gui_get_wide_font() == FAIL)
57 errmsg = (char_u *)N_("E534: Invalid wide font");
58 + redraw_gui_only = TRUE;
67 else if (varp == &p_go)
69 gui_init_which_components(oldval);
70 + redraw_gui_only = TRUE;
74 #if defined(FEAT_GUI_TABLINE)
76 else if (varp == &p_gtl)
78 redraw_tabline = TRUE;
79 + redraw_gui_only = TRUE;
81 + /* 'guitabtooltip' */
82 + else if (varp == &p_gtt)
84 + redraw_gui_only = TRUE;
88 #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
92 if (curwin->w_curswant != MAXCOL)
93 curwin->w_set_curswant = TRUE; /* in case 'showbreak' changed */
94 ! check_redraw(options[opt_idx].flags);
100 if (curwin->w_curswant != MAXCOL)
101 curwin->w_set_curswant = TRUE; /* in case 'showbreak' changed */
103 ! /* check redraw when it's not a GUI option or the GUI is active. */
104 ! if (!redraw_gui_only || gui.in_use)
106 ! check_redraw(options[opt_idx].flags);
110 *** ../vim-7.2.098/src/version.c Wed Feb 4 16:25:53 2009
111 --- src/version.c Wed Feb 4 17:24:11 2009
115 { /* Add new patch number below this line */
121 I started out with nothing, and I still have most of it.
122 -- Michael Davis -- "Tonight Show"
124 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
125 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
126 \\\ download, build and distribute -- http://www.A-A-P.org ///
127 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///