changeset 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 999d9509e6af
children 1804d2f6eb1d
files src/option.c src/version.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -3656,6 +3656,7 @@ set_option_default(opt_idx, opt_flags, c
 
 /*
  * 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
 	    {
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    830,
+/**/
     829,
 /**/
     828,