]> granicus.if.org Git - vim/commitdiff
patch 7.4.830 v7.4.830
authorBram Moolenaar <Bram@vim.org>
Tue, 25 Aug 2015 10:56:31 +0000 (12:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 25 Aug 2015 10:56:31 +0000 (12:56 +0200)
Problem:    Resetting 'encoding' when doing ":set all&" causes problems.
            (Bjorn Linse) Display is not updated.
Solution:   Do not reset 'encoding'. Do a full redraw.

src/option.c
src/version.c

index f3e4e20fb43c46487edc4ea6320017e76d7944f4..08e2e5948061aa5ce36e32729c103c9318482bf6 100644 (file)
@@ -3656,6 +3656,7 @@ set_option_default(opt_idx, opt_flags, compatible)
 
 /*
  * Set all options (except terminal options) to their default value.
+ * When "opt_flags" is non-zero skip 'encoding'.
  */
     static void
 set_options_default(opt_flags)
@@ -3668,7 +3669,8 @@ set_options_default(opt_flags)
 #endif
 
     for (i = 0; !istermoption(&options[i]); i++)
-       if (!(options[i].flags & P_NODEFAULT))
+       if (!(options[i].flags & P_NODEFAULT)
+               && (opt_flags == 0 || options[i].var != (char_u *)&p_enc))
            set_option_default(i, opt_flags, p_cp);
 
 #ifdef FEAT_WINDOWS
@@ -4204,6 +4206,7 @@ do_set(arg, opt_flags)
                ++arg;
                /* Only for :set command set global value of local options. */
                set_options_default(OPT_FREE | opt_flags);
+               redraw_all_later(CLEAR);
            }
            else
            {
index 5bd31fad4549cee95b06e789ebfdeed0e380b487..619aa588b66595f5a119f14b7881ec13f684b43a 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    830,
 /**/
     829,
 /**/