Skip to content

Commit 14317a7

Browse files
committed
updated for version 7.3.745
Problem: Automatically setting 'ttymouse' doesn't work. Solution: Reset the "option was set" flag when using the default.
1 parent 8a896c3 commit 14317a7

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

src/option.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11178,6 +11178,19 @@ option_was_set(name)
1117811178
return FALSE;
1117911179
}
1118011180

11181+
/*
11182+
* Reset the flag indicating option "name" was set.
11183+
*/
11184+
void
11185+
reset_option_was_set(name)
11186+
char_u *name;
11187+
{
11188+
int idx = findoption(name);
11189+
11190+
if (idx >= 0)
11191+
options[idx].flags &= ~P_WAS_SET;
11192+
}
11193+
1118111194
/*
1118211195
* compatible_set() - Called when 'compatible' has been set or unset.
1118311196
*

src/proto/option.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ int shortmess __ARGS((int x));
5252
void vimrc_found __ARGS((char_u *fname, char_u *envname));
5353
void change_compatible __ARGS((int on));
5454
int option_was_set __ARGS((char_u *name));
55+
void reset_option_was_set __ARGS((char_u *name));
5556
int can_bs __ARGS((int what));
5657
void save_file_ff __ARGS((buf_T *buf));
5758
int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));

src/term.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,12 @@ set_termname(term)
18641864
}
18651865
# endif
18661866
if (p != NULL)
1867+
{
18671868
set_option_value((char_u *)"ttym", 0L, p, 0);
1869+
/* Reset the WAS_SET flag, 'ttymouse' can be set to "sgr" or
1870+
* "xterm2" in check_termcode(). */
1871+
reset_option_was_set((char_u *)"ttym");
1872+
}
18681873
if (p == NULL
18691874
# ifdef FEAT_GUI
18701875
|| gui.in_use

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ static char *(features[]) =
725725

726726
static int included_patches[] =
727727
{ /* Add new patch number below this line */
728+
/**/
729+
745,
728730
/**/
729731
744,
730732
/**/

0 commit comments

Comments
 (0)