summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-12-05 14:43:02 +0100
committerBram Moolenaar <Bram@vim.org>2012-12-05 14:43:02 +0100
commit15d55dec03eca3ae87d245f23fad086a501d7f07 (patch)
treee382605f6c00c8df8d11107309d805c58f31fb2b /src
parent862cfa356dfd0d8a6e31e7e0060098889c8d83b9 (diff)
downloadvim-git-15d55dec03eca3ae87d245f23fad086a501d7f07.tar.gz
updated for version 7.3.745v7.3.745
Problem: Automatically setting 'ttymouse' doesn't work. Solution: Reset the "option was set" flag when using the default.
Diffstat (limited to 'src')
-rw-r--r--src/option.c13
-rw-r--r--src/proto/option.pro1
-rw-r--r--src/term.c5
-rw-r--r--src/version.c2
4 files changed, 21 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 2ab077063..d8eb314d4 100644
--- a/src/option.c
+++ b/src/option.c
@@ -11179,6 +11179,19 @@ option_was_set(name)
}
/*
+ * 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.
*
* When 'compatible' set: Set all relevant options (those that have the P_VIM)
diff --git a/src/proto/option.pro b/src/proto/option.pro
index fd71704ec..63570fa4c 100644
--- a/src/proto/option.pro
+++ b/src/proto/option.pro
@@ -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));
diff --git a/src/term.c b/src/term.c
index 3efa7a7a1..2c0d35ad9 100644
--- a/src/term.c
+++ b/src/term.c
@@ -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
diff --git a/src/version.c b/src/version.c
index 708e48742..8296bd49f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -726,6 +726,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 745,
+/**/
744,
/**/
743,