mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
Make ttyfast default to true on all terminals #1051
This commit is contained in:

committed by
Justin M. Keyes

parent
d067ad66ac
commit
6dcd629ed6
@@ -7490,9 +7490,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
xterm entries...).
|
xterm entries...).
|
||||||
|
|
||||||
*'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
|
*'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
|
||||||
'ttyfast' 'tf' boolean (default off, on when 'term' is xterm, hpterm,
|
'ttyfast' 'tf' boolean (default on)
|
||||||
sun-cmd, screen, rxvt or dtterm; also
|
|
||||||
on when running Vim in a DOS console)
|
|
||||||
global
|
global
|
||||||
{not in Vi}
|
{not in Vi}
|
||||||
Indicates a fast terminal connection. More characters will be sent to
|
Indicates a fast terminal connection. More characters will be sent to
|
||||||
|
@@ -1597,7 +1597,7 @@ static struct vimoption
|
|||||||
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
|
||||||
{"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF,
|
{"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF,
|
||||||
(char_u *)&p_tf, PV_NONE,
|
(char_u *)&p_tf, PV_NONE,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
|
||||||
{"ttymouse", "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF,
|
{"ttymouse", "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF,
|
||||||
#if defined(FEAT_MOUSE) && defined(UNIX)
|
#if defined(FEAT_MOUSE) && defined(UNIX)
|
||||||
(char_u *)&p_ttym, PV_NONE,
|
(char_u *)&p_ttym, PV_NONE,
|
||||||
|
@@ -298,32 +298,6 @@ int use_xterm_mouse(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vim_is_vt300(char_u *name)
|
|
||||||
{
|
|
||||||
if (name == NULL)
|
|
||||||
return FALSE; /* actually all ANSI comp. terminals should be here */
|
|
||||||
/* catch VT100 - VT5xx */
|
|
||||||
return (STRNICMP(name, "vt", 2) == 0
|
|
||||||
&& vim_strchr((char_u *)"12345", name[2]) != NULL)
|
|
||||||
|| STRCMP(name, "builtin_vt320") == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Return TRUE if "name" is a terminal for which 'ttyfast' should be set.
|
|
||||||
* This should include all windowed terminal emulators.
|
|
||||||
*/
|
|
||||||
int vim_is_fastterm(char_u *name)
|
|
||||||
{
|
|
||||||
if (name == NULL)
|
|
||||||
return FALSE;
|
|
||||||
if (vim_is_xterm(name) || vim_is_vt300(name))
|
|
||||||
return TRUE;
|
|
||||||
return STRNICMP(name, "hpterm", 6) == 0
|
|
||||||
|| STRNICMP(name, "sun-cmd", 7) == 0
|
|
||||||
|| STRNICMP(name, "screen", 6) == 0
|
|
||||||
|| STRNICMP(name, "dtterm", 6) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(USE_FNAME_CASE) || defined(PROTO)
|
#if defined(USE_FNAME_CASE) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Set the case of the file name, if it already exists. This will cause the
|
* Set the case of the file name, if it already exists. This will cause the
|
||||||
|
@@ -1418,15 +1418,6 @@ int set_termname(char_u *term)
|
|||||||
set_mouse_termcode(KS_MOUSE, (char_u *)"\233M");
|
set_mouse_termcode(KS_MOUSE, (char_u *)"\233M");
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(UNIX)
|
|
||||||
/*
|
|
||||||
* 'ttyfast' is default on for xterm and a few others.
|
|
||||||
*/
|
|
||||||
if (vim_is_fastterm(term))
|
|
||||||
p_tf = TRUE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ttest(TRUE); /* make sure we have a valid set of terminal codes */
|
ttest(TRUE); /* make sure we have a valid set of terminal codes */
|
||||||
|
|
||||||
full_screen = TRUE; /* we can use termcap codes from now on */
|
full_screen = TRUE; /* we can use termcap codes from now on */
|
||||||
|
Reference in New Issue
Block a user