comparison src/option.c @ 7034:e668b160ac68 v7.4.830

commit https://github.com/vim/vim/commit/b341dda575899458f7075614dcedf0a80ee9d080 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 25 12:56:31 2015 +0200 patch 7.4.830 Problem: Resetting 'encoding' when doing ":set all&" causes problems. (Bjorn Linse) Display is not updated. Solution: Do not reset 'encoding'. Do a full redraw.
author Christian Brabandt <cb@256bit.org>
date Tue, 25 Aug 2015 17:20:25 +0200
parents 5ea5bd9c18d2
children 17a3fa77e941
comparison
equal deleted inserted replaced
7033:999d9509e6af 7034:e668b160ac68
3654 #endif 3654 #endif
3655 } 3655 }
3656 3656
3657 /* 3657 /*
3658 * Set all options (except terminal options) to their default value. 3658 * Set all options (except terminal options) to their default value.
3659 * When "opt_flags" is non-zero skip 'encoding'.
3659 */ 3660 */
3660 static void 3661 static void
3661 set_options_default(opt_flags) 3662 set_options_default(opt_flags)
3662 int opt_flags; /* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */ 3663 int opt_flags; /* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
3663 { 3664 {
3666 win_T *wp; 3667 win_T *wp;
3667 tabpage_T *tp; 3668 tabpage_T *tp;
3668 #endif 3669 #endif
3669 3670
3670 for (i = 0; !istermoption(&options[i]); i++) 3671 for (i = 0; !istermoption(&options[i]); i++)
3671 if (!(options[i].flags & P_NODEFAULT)) 3672 if (!(options[i].flags & P_NODEFAULT)
3673 && (opt_flags == 0 || options[i].var != (char_u *)&p_enc))
3672 set_option_default(i, opt_flags, p_cp); 3674 set_option_default(i, opt_flags, p_cp);
3673 3675
3674 #ifdef FEAT_WINDOWS 3676 #ifdef FEAT_WINDOWS
3675 /* The 'scroll' option must be computed for all windows. */ 3677 /* The 'scroll' option must be computed for all windows. */
3676 FOR_ALL_TAB_WINDOWS(tp, wp) 3678 FOR_ALL_TAB_WINDOWS(tp, wp)
4202 if (*arg == '&') 4204 if (*arg == '&')
4203 { 4205 {
4204 ++arg; 4206 ++arg;
4205 /* Only for :set command set global value of local options. */ 4207 /* Only for :set command set global value of local options. */
4206 set_options_default(OPT_FREE | opt_flags); 4208 set_options_default(OPT_FREE | opt_flags);
4209 redraw_all_later(CLEAR);
4207 } 4210 }
4208 else 4211 else
4209 { 4212 {
4210 showoptions(1, opt_flags); 4213 showoptions(1, opt_flags);
4211 did_show = TRUE; 4214 did_show = TRUE;