]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.745 v7.3.745
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Dec 2012 13:43:02 +0000 (14:43 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Dec 2012 13:43:02 +0000 (14:43 +0100)
Problem:    Automatically setting 'ttymouse' doesn't work.
Solution:   Reset the "option was set" flag when using the default.

src/option.c
src/proto/option.pro
src/term.c
src/version.c

index 2ab077063b5da1255b25b85c8ef98b4f44bcc90b..d8eb314d4ad55d52c01ad89b9db002f3fc0c1d4c 100644 (file)
@@ -11178,6 +11178,19 @@ option_was_set(name)
     return FALSE;
 }
 
+/*
+ * Reset the flag indicating option "name" was set.
+ */
+    void
+reset_option_was_set(name)
+    char_u     *name;
+{
+    int idx = findoption(name);
+
+    if (idx >= 0)
+       options[idx].flags &= ~P_WAS_SET;
+}
+
 /*
  * compatible_set() - Called when 'compatible' has been set or unset.
  *
index fd71704ec1f39c26345e1f16f99770e9182bee8a..63570fa4c5f129f2014705fdd728b80a51a4a334 100644 (file)
@@ -52,6 +52,7 @@ int shortmess __ARGS((int x));
 void vimrc_found __ARGS((char_u *fname, char_u *envname));
 void change_compatible __ARGS((int on));
 int option_was_set __ARGS((char_u *name));
+void reset_option_was_set __ARGS((char_u *name));
 int can_bs __ARGS((int what));
 void save_file_ff __ARGS((buf_T *buf));
 int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
index 3efa7a7a1468a9584a7991a990b1e0a8fb182e77..2c0d35ad992c9fbab70b37043614c94852e77057 100644 (file)
@@ -1864,7 +1864,12 @@ set_termname(term)
        }
 #  endif
        if (p != NULL)
+       {
            set_option_value((char_u *)"ttym", 0L, p, 0);
+           /* Reset the WAS_SET flag, 'ttymouse' can be set to "sgr" or
+            * "xterm2" in check_termcode(). */
+           reset_option_was_set((char_u *)"ttym");
+       }
        if (p == NULL
 #   ifdef FEAT_GUI
                || gui.in_use
index 708e48742e41a2fb2869bf7765fca562c5a66bae..8296bd49f3ab089469100fcd9960dd0c060bfc1d 100644 (file)
@@ -725,6 +725,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    745,
 /**/
     744,
 /**/