0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.745

Problem:    Automatically setting 'ttymouse' doesn't work.
Solution:   Reset the "option was set" flag when using the default.
This commit is contained in:
Bram Moolenaar 2012-12-05 14:43:02 +01:00
parent 862cfa356d
commit 15d55dec03
4 changed files with 21 additions and 0 deletions

View 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.
*

View 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));

View 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

View File

@ -725,6 +725,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
745,
/**/
744,
/**/