]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0948: 'ttyfast' is set for arbitrary terminals v9.0.0948
authorBram Moolenaar <Bram@vim.org>
Fri, 25 Nov 2022 15:09:35 +0000 (15:09 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Nov 2022 15:09:35 +0000 (15:09 +0000)
Problem:    'ttyfast' is set for arbitrary terminals.
Solution:   Always set 'ttyfast'. (closes #11549)

runtime/doc/options.txt
runtime/doc/os_unix.txt
runtime/doc/os_vms.txt
runtime/doc/term.txt
src/optiondefs.h
src/os_unix.c
src/proto/os_unix.pro
src/term.c
src/version.c

index c730527cf1b6af5a4a348b0697c9b6ce48d9bed7..83a4904c35c75f0b36c2d57cbdafd7e59e30fe45 100644 (file)
@@ -8569,10 +8569,7 @@ A jump table for the options with a short description can be found at |Q_op|.
        xterm entries...).
 
                                     *'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
-'ttyfast' 'tf'         boolean (default off, on when 'term' is xterm, hpterm,
-                                       sun-cmd, screen, rxvt, dtterm or
-                                       iris-ansi; also on when running Vim in
-                                       a DOS console)
+'ttyfast' 'tf'         boolean (default on)
                        global
        Indicates a fast terminal connection.  More characters will be sent to
        the screen for redrawing, instead of using insert/delete line
@@ -8582,6 +8579,14 @@ A jump table for the options with a short description can be found at |Q_op|.
        line for lines that wrap.  This helps when using copy/paste with the
        mouse in an xterm and other terminals.
 
+       The default used to be set only for some terminal names, but these
+       days nearly all terminals are fast, therefore the default is now "on".
+       If you have a slow connection you may want to set this option off,
+       e.g. depending on the host name: >
+               if hostname() =~ 'faraway'
+                  set nottyfast
+               endif
+<
                                                *'ttymouse'* *'ttym'*
 'ttymouse' 'ttym'      string  (default depends on 'term')
                        global
index 0b0f389bc387b552dc142b89f5738c99ae80861c..f875f160d322b9bdca1dd523320a75ed1464f019 100644 (file)
@@ -28,10 +28,11 @@ system() is used, which is a bit slower.  The output of ":version" includes
 can be changed at compile time.
 (For forking of the GUI version see |gui-fork|.)
 
-Because terminal updating under Unix is often slow (e.g. serial line
-terminal, shell window in suntools), the 'showcmd' and 'ruler' options
-are off by default.  If you have a fast terminal, try setting them on.  You
-might also want to set 'ttyfast'.
+For historic reasons terminal updating under Unix is expected to be slow (e.g.
+serial line terminal, shell window in suntools), the 'showcmd' and 'ruler'
+options are off by default.  If you have a fast terminal, try setting them
+on: >
+       set showcmd ruler
 
 When using Vim in an xterm the mouse clicks can be used by Vim by setting
 'mouse' to "a".  If there is access to an X-server gui style copy/paste will
index b2a159018c01d78b1be9fe74f09a6f3b80b9b3bc..8ba12baa74141409b41a897d6f2914e5b3d83f7a 100644 (file)
@@ -458,18 +458,11 @@ Ins, Del buttons etc., except Backspace in GUI mode.  To solve it, add to
 
 Vim will also recognize that they are fast terminals.
 
-If you have some annoying line jumping on the screen between windows add to
-your .vimrc file: >
-
-       set ttyfast     " set fast terminal
-
-Note: if you're using Vim on remote host or through a very slow connection, it's
-recommended to avoid the fast terminal option with: >
+If you're using Vim on remote host or through a very slow connection, you
+might want to reset fast terminal option with: >
 
        set nottyfast   " set terminal to slow mode
 
-(Zoltan Arpadffy, Vim 5.6)
-
 
 8.7 Hex-editing and other external tools
 
index fdbcc7d41347866fc0717b578d47967e64d8eb8a..2bd83c71252a5e947e9b076ea10c59aa8b81f1df 100644 (file)
@@ -768,8 +768,9 @@ See the "Options" chapter |options|.
 
 If your terminal does not support a scrolling region, but it does support
 insert/delete line commands, scrolling with multiple windows may make the
-lines jump up and down.  If you don't want this set the 'ttyfast' option.
-This will redraw the window instead of scroll it.
+lines jump up and down.  This would happen if the 'ttyfast' option has been
+reset.  Check that with: >
+       verbose set ttyfast?
 
 If your terminal scrolls very slowly, but redrawing is not slow, set the
 'ttyscroll' option to a small number, e.g., 3.  This will make Vim redraw the
index 0278b6061ae5c7a6b8b32e4d42b96daad9ca3da0..e7eb357d7e5e154b9c3432873b1153eaaf5112db 100644 (file)
@@ -2599,7 +2599,7 @@ static struct vimoption options[] =
                            {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
     {"ttyfast",            "tf",   P_BOOL|P_NO_MKRC|P_VI_DEF,
                            (char_u *)&p_tf, PV_NONE,
-                           {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+                           {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
     {"ttymouse",    "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF,
 #if defined(UNIX) || defined(VMS)
                            (char_u *)&p_ttym, PV_NONE,
index 0540fc95045c69d8a75688fd8c170ccad6965a91..fd6d35fedcfce1860fa2ccaf6f2a4abfe831f3cf 100644 (file)
@@ -2437,24 +2437,6 @@ vim_is_vt300(char_u *name)
            || 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) || vim_is_iris(name))
-       return TRUE;
-    return (   STRNICMP(name, "hpterm", 6) == 0
-           || STRNICMP(name, "sun-cmd", 7) == 0
-           || STRNICMP(name, "screen", 6) == 0
-           || STRNICMP(name, "tmux", 4) == 0
-           || STRNICMP(name, "dtterm", 6) == 0);
-}
-
 /*
  * Insert user name in s[len].
  * Return OK if a name found.
index f30b78d26cd677e7015756e5099b75413e20fb77..9266364403746b5a12fa5036b30f32f4c3fc99e7 100644 (file)
@@ -23,7 +23,6 @@ int use_xterm_like_mouse(char_u *name);
 int use_xterm_mouse(void);
 int vim_is_iris(char_u *name);
 int vim_is_vt300(char_u *name);
-int vim_is_fastterm(char_u *name);
 int mch_get_user_name(char_u *s, int len);
 int mch_get_uname(uid_t uid, char_u *s, int len);
 void mch_get_host_name(char_u *s, int len);
index 8a428338a84fbec648d7ac1fe1362582307ff86b..ec3c3db5ad4eef4506ed8f09abb9ab4547313c8a 100644 (file)
@@ -2174,21 +2174,6 @@ set_termname(char_u *term)
     }
 #endif
 
-#if defined(UNIX) || defined(VMS)
-    /*
-     * 'ttyfast' is default on for xterm, iris-ansi and a few others.
-     */
-    if (vim_is_fastterm(term))
-       p_tf = TRUE;
-#endif
-#ifdef USE_TERM_CONSOLE
-    /*
-     * 'ttyfast' is default on consoles
-     */
-    if (term_console)
-       p_tf = TRUE;
-#endif
-
     ttest(TRUE);       // make sure we have a valid set of terminal codes
 
     full_screen = TRUE;                // we can use termcap codes from now on
index 5686005f34d23de6d3e784efd339ff6e366bc7ff..8427210fdb70c5b6605d1b3cd913404175d89aae 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    948,
 /**/
     947,
 /**/