diff src/option.c @ 23:3f44e9abe4ec v7.0015

updated for version 7.0015
author vimboss
date Mon, 06 Sep 2004 17:44:46 +0000
parents cc049b00ee70
children 8ff7fd162d3c
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -3529,6 +3529,12 @@ do_set(arg, opt_flags)
 		goto skip;
 	    }
 
+	    /* Skip all options that are not window-local (used when showing
+	     * an already loaded buffer in a window). */
+	    if ((opt_flags & OPT_WINONLY)
+		    && (opt_idx < 0 || options[opt_idx].var != VAR_WIN))
+		goto skip;
+
 #ifdef HAVE_SANDBOX
 	    /* Disallow changing some options in the sandbox */
 	    if (sandbox > 0 && (flags & P_SECURE))
@@ -4280,7 +4286,8 @@ set_options_bin(oldval, newval, opt_flag
  * Find the parameter represented by the given character (eg ', :, ", or /),
  * and return its associated value in the 'viminfo' string.
  * Only works for number parameters, not for 'r' or 'n'.
- * If the parameter is not specified in the string, return -1.
+ * If the parameter is not specified in the string or there is no following
+ * number, return -1.
  */
     int
 get_viminfo_parameter(type)
@@ -5149,7 +5156,13 @@ did_set_string_option(opt_idx, varp, new
 		while (*++s && *s != ',')
 		    ;
 	    }
-	    else if (*s == '%' || *s == '!' || *s == 'h' || *s == 'c')
+	    else if (*s == '%')
+	    {
+		/* optional number */
+		while (vim_isdigit(*++s))
+		    ;
+	    }
+	    else if (*s == '!' || *s == 'h' || *s == 'c')
 		++s;		/* no extra chars */
 	    else		/* must have a number */
 	    {