forked from aniani/vim
patch 8.1.1198: bracketed paste may remain active after Vim exists
Problem: Bracketed paste may remain active after Vim exists, because the
terminal emulater restores the setting.
Solution: Set/reset bracketed paste mode before setting the terminal mode.
(closes #3579)
This commit is contained in:
18
src/term.c
18
src/term.c
@@ -3496,19 +3496,23 @@ settmode(int tmode)
|
||||
#endif
|
||||
#ifdef FEAT_MOUSE_TTY
|
||||
if (tmode != TMODE_RAW)
|
||||
mch_setmouse(FALSE); /* switch mouse off */
|
||||
mch_setmouse(FALSE); // switch mouse off
|
||||
#endif
|
||||
if (tmode != TMODE_RAW)
|
||||
out_str(T_BD); /* disable bracketed paste mode */
|
||||
if (termcap_active)
|
||||
{
|
||||
if (tmode != TMODE_RAW)
|
||||
out_str(T_BD); // disable bracketed paste mode
|
||||
else
|
||||
out_str(T_BE); // enable bracketed paste mode (should
|
||||
// be before mch_settmode().
|
||||
}
|
||||
out_flush();
|
||||
mch_settmode(tmode); /* machine specific function */
|
||||
mch_settmode(tmode); // machine specific function
|
||||
cur_tmode = tmode;
|
||||
#ifdef FEAT_MOUSE
|
||||
if (tmode == TMODE_RAW)
|
||||
setmouse(); /* may switch mouse on */
|
||||
setmouse(); // may switch mouse on
|
||||
#endif
|
||||
if (tmode == TMODE_RAW)
|
||||
out_str(T_BE); /* enable bracketed paste mode */
|
||||
out_flush();
|
||||
}
|
||||
#ifdef FEAT_TERMRESPONSE
|
||||
|
||||
@@ -771,6 +771,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1198,
|
||||
/**/
|
||||
1197,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user