To: vim_dev@googlegroups.com Subject: Patch 9.0.0948 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0948 Problem: 'ttyfast' is set for arbitrary terminals. Solution: Always set 'ttyfast'. (closes #11549) Files: runtime/doc/options.txt, runtime/doc/os_unix.txt, runtime/doc/os_vms.txt, runtime/doc/term.txt, src/optiondefs.h, src/term.c, src/os_unix.c, src/proto/os_unix.pro *** ../vim-9.0.0947/runtime/doc/options.txt 2022-11-23 20:19:17.125682463 +0000 --- runtime/doc/options.txt 2022-11-25 14:24:46.401502750 +0000 *************** *** 8533,8542 **** 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) global Indicates a fast terminal connection. More characters will be sent to the screen for redrawing, instead of using insert/delete line --- 8569,8575 ---- xterm entries...). *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* ! '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 *************** *** 8546,8551 **** --- 8579,8592 ---- 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 *** ../vim-9.0.0947/runtime/doc/os_unix.txt 2022-06-28 11:21:06.000000000 +0100 --- runtime/doc/os_unix.txt 2022-11-25 14:26:33.833497030 +0000 *************** *** 28,37 **** 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'. 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 --- 28,38 ---- can be changed at compile time. (For forking of the GUI version see |gui-fork|.) ! 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 *** ../vim-9.0.0947/runtime/doc/os_vms.txt 2022-06-28 11:21:06.000000000 +0100 --- runtime/doc/os_vms.txt 2022-11-25 14:28:20.421493271 +0000 *************** *** 458,475 **** 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: > set nottyfast " set terminal to slow mode - (Zoltan Arpadffy, Vim 5.6) - 8.7 Hex-editing and other external tools --- 458,468 ---- Vim will also recognize that they are fast terminals. ! 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 8.7 Hex-editing and other external tools *** ../vim-9.0.0947/runtime/doc/term.txt 2022-09-01 13:19:53.410957280 +0100 --- runtime/doc/term.txt 2022-11-25 14:30:19.429490893 +0000 *************** *** 768,775 **** 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. 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 --- 768,776 ---- 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. 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 *** ../vim-9.0.0947/src/optiondefs.h 2022-11-23 20:19:17.133682464 +0000 --- src/optiondefs.h 2022-11-25 14:04:15.657993596 +0000 *************** *** 2599,2605 **** {(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}, {"ttymouse", "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF, #if defined(UNIX) || defined(VMS) (char_u *)&p_ttym, PV_NONE, --- 2599,2605 ---- {(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 *)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, *** ../vim-9.0.0947/src/term.c 2022-11-24 13:27:32.385881078 +0000 --- src/term.c 2022-11-25 14:06:19.221870892 +0000 *************** *** 2174,2194 **** } #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 --- 2174,2179 ---- *** ../vim-9.0.0947/src/os_unix.c 2022-11-23 20:19:17.133682464 +0000 --- src/os_unix.c 2022-11-25 14:06:01.861886322 +0000 *************** *** 2438,2461 **** } /* - * 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. */ --- 2438,2443 ---- *** ../vim-9.0.0947/src/proto/os_unix.pro 2022-06-27 23:15:18.000000000 +0100 --- src/proto/os_unix.pro 2022-11-25 14:06:06.965881729 +0000 *************** *** 23,29 **** 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); --- 23,28 ---- *** ../vim-9.0.0947/src/version.c 2022-11-25 13:03:28.200437332 +0000 --- src/version.c 2022-11-25 14:04:07.578002744 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 948, /**/ -- hundred-and-one symptoms of being an internet addict: 141. You'd rather go to http://www.weather.com/ than look out your window. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///