To: vim_dev@googlegroups.com Subject: Patch 8.0.1743 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ [I had accidentally included the changes to src/structs.h in patch 8.0.1742] Patch 8.0.1743 Problem: Terminal window options are named inconsistently. Solution: prefix terminal window options with "termwin". Keep the old names for now as an alias. Files: src/option.c, src/option.h, src/structs.h, src/terminal.c, src/testdir/test_terminal.vim, src/testdir/gen_opt_test.vim, runtime/doc/options.txt, runtime/doc/quickref.txt, runtime/doc/terminal.txt, runtime/optwin.vim *** ../vim-8.0.1742/src/option.c 2018-04-15 23:45:12.978388406 +0200 --- src/option.c 2018-04-18 21:39:57.967170197 +0200 *************** *** 250,257 **** # define PV_COLE OPT_WIN(WV_COLE) #endif #ifdef FEAT_TERMINAL ! # define PV_TK OPT_WIN(WV_TK) ! # define PV_TMS OPT_WIN(WV_TMS) #endif #ifdef FEAT_SIGNS # define PV_SCL OPT_WIN(WV_SCL) --- 250,258 ---- # define PV_COLE OPT_WIN(WV_COLE) #endif #ifdef FEAT_TERMINAL ! # define PV_TWK OPT_WIN(WV_TWK) ! # define PV_TWS OPT_WIN(WV_TWS) ! # define PV_TWSL OPT_BUF(BV_TWSL) #endif #ifdef FEAT_SIGNS # define PV_SCL OPT_WIN(WV_SCL) *************** *** 373,378 **** --- 374,382 ---- #ifdef FEAT_KEYMAP static char_u *p_keymap; #endif + #ifdef FEAT_TERMINAL + static long p_twsl; + #endif /* Saved values for when 'bin' is set. */ static int p_et_nobin; *************** *** 2750,2776 **** {(char_u *)FALSE, (char_u *)FALSE} #endif SCRIPTID_INIT}, {"terminalscroll", "tlsl", P_NUM|P_VI_DEF|P_VIM|P_RBUF, #ifdef FEAT_TERMINAL ! (char_u *)&p_tlsl, PV_NONE, {(char_u *)10000L, (char_u *)10000L} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} #endif SCRIPTID_INIT}, ! {"termkey", "tk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, #ifdef FEAT_TERMINAL ! (char_u *)VAR_WIN, PV_TK, {(char_u *)"", (char_u *)NULL} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} #endif SCRIPTID_INIT}, {"termsize", "tms", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, #ifdef FEAT_TERMINAL ! (char_u *)VAR_WIN, PV_TMS, {(char_u *)"", (char_u *)NULL} #else (char_u *)NULL, PV_NONE, --- 2754,2810 ---- {(char_u *)FALSE, (char_u *)FALSE} #endif SCRIPTID_INIT}, + /* TODO: remove this deprecated entry */ {"terminalscroll", "tlsl", P_NUM|P_VI_DEF|P_VIM|P_RBUF, #ifdef FEAT_TERMINAL ! (char_u *)&p_twsl, PV_TWSL, {(char_u *)10000L, (char_u *)10000L} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} #endif SCRIPTID_INIT}, ! /* TODO: remove this deprecated entry */ ! {"termkey", "tk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, #ifdef FEAT_TERMINAL ! (char_u *)VAR_WIN, PV_TWK, {(char_u *)"", (char_u *)NULL} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} #endif SCRIPTID_INIT}, + /* TODO: remove this deprecated entry */ {"termsize", "tms", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, #ifdef FEAT_TERMINAL ! (char_u *)VAR_WIN, PV_TWS, ! {(char_u *)"", (char_u *)NULL} ! #else ! (char_u *)NULL, PV_NONE, ! {(char_u *)NULL, (char_u *)0L} ! #endif ! SCRIPTID_INIT}, ! {"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, ! #ifdef FEAT_TERMINAL ! (char_u *)VAR_WIN, PV_TWK, ! {(char_u *)"", (char_u *)NULL} ! #else ! (char_u *)NULL, PV_NONE, ! {(char_u *)NULL, (char_u *)0L} ! #endif ! SCRIPTID_INIT}, ! {"termwinscroll", "twsl", P_NUM|P_VI_DEF|P_VIM|P_RBUF, ! #ifdef FEAT_TERMINAL ! (char_u *)&p_twsl, PV_TWSL, ! {(char_u *)10000L, (char_u *)10000L} ! #else ! (char_u *)NULL, PV_NONE, ! {(char_u *)NULL, (char_u *)0L} ! #endif ! SCRIPTID_INIT}, ! {"termwinsize", "tws", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, ! #ifdef FEAT_TERMINAL ! (char_u *)VAR_WIN, PV_TWS, {(char_u *)"", (char_u *)NULL} #else (char_u *)NULL, PV_NONE, *************** *** 7452,7470 **** #endif #ifdef FEAT_TERMINAL ! /* 'termkey' */ ! else if (varp == &curwin->w_p_tk) { ! if (*curwin->w_p_tk != NUL && string_to_key(curwin->w_p_tk, TRUE) == 0) errmsg = e_invarg; } ! /* 'termsize' */ ! else if (varp == &curwin->w_p_tms) { ! if (*curwin->w_p_tms != NUL) { ! p = skipdigits(curwin->w_p_tms); ! if (p == curwin->w_p_tms || (*p != 'x' && *p != '*') || *skipdigits(p + 1) != NUL) errmsg = e_invarg; --- 7486,7505 ---- #endif #ifdef FEAT_TERMINAL ! /* 'termwinkey' */ ! else if (varp == &curwin->w_p_twk) { ! if (*curwin->w_p_twk != NUL ! && string_to_key(curwin->w_p_twk, TRUE) == 0) errmsg = e_invarg; } ! /* 'termwinsize' */ ! else if (varp == &curwin->w_p_tws) { ! if (*curwin->w_p_tws != NUL) { ! p = skipdigits(curwin->w_p_tws); ! if (p == curwin->w_p_tws || (*p != 'x' && *p != '*') || *skipdigits(p + 1) != NUL) errmsg = e_invarg; *************** *** 10687,10694 **** case PV_COLE: return (char_u *)&(curwin->w_p_cole); #endif #ifdef FEAT_TERMINAL ! case PV_TK: return (char_u *)&(curwin->w_p_tk); ! case PV_TMS: return (char_u *)&(curwin->w_p_tms); #endif case PV_AI: return (char_u *)&(curbuf->b_p_ai); --- 10722,10730 ---- case PV_COLE: return (char_u *)&(curwin->w_p_cole); #endif #ifdef FEAT_TERMINAL ! case PV_TWK: return (char_u *)&(curwin->w_p_twk); ! case PV_TWS: return (char_u *)&(curwin->w_p_tws); ! case PV_TWSL: return (char_u *)&(curbuf->b_p_twsl); #endif case PV_AI: return (char_u *)&(curbuf->b_p_ai); *************** *** 10887,10894 **** to->wo_cole = from->wo_cole; #endif #ifdef FEAT_TERMINAL ! to->wo_tk = vim_strsave(from->wo_tk); ! to->wo_tms = vim_strsave(from->wo_tms); #endif #ifdef FEAT_FOLDING to->wo_fdc = from->wo_fdc; --- 10923,10930 ---- to->wo_cole = from->wo_cole; #endif #ifdef FEAT_TERMINAL ! to->wo_twk = vim_strsave(from->wo_twk); ! to->wo_tws = vim_strsave(from->wo_tws); #endif #ifdef FEAT_FOLDING to->wo_fdc = from->wo_fdc; *************** *** 10957,10964 **** check_string_option(&wop->wo_cocu); #endif #ifdef FEAT_TERMINAL ! check_string_option(&wop->wo_tk); ! check_string_option(&wop->wo_tms); #endif #ifdef FEAT_LINEBREAK check_string_option(&wop->wo_briopt); --- 10993,11000 ---- check_string_option(&wop->wo_cocu); #endif #ifdef FEAT_TERMINAL ! check_string_option(&wop->wo_twk); ! check_string_option(&wop->wo_tws); #endif #ifdef FEAT_LINEBREAK check_string_option(&wop->wo_briopt); *************** *** 11000,11007 **** clear_string_option(&wop->wo_cocu); #endif #ifdef FEAT_TERMINAL ! clear_string_option(&wop->wo_tk); ! clear_string_option(&wop->wo_tms); #endif } --- 11036,11043 ---- clear_string_option(&wop->wo_cocu); #endif #ifdef FEAT_TERMINAL ! clear_string_option(&wop->wo_twk); ! clear_string_option(&wop->wo_tws); #endif } *************** *** 11178,11183 **** --- 11214,11222 ---- buf->b_p_keymap = vim_strsave(p_keymap); buf->b_kmap_state |= KEYMAP_INIT; #endif + #ifdef FEAT_TERMINAL + buf->b_p_twsl = p_twsl; + #endif /* This isn't really an option, but copying the langmap and IME * state from the current buffer is better than resetting it. */ buf->b_p_iminsert = p_iminsert; *** ../vim-8.0.1742/src/option.h 2018-04-14 18:13:44.371164679 +0200 --- src/option.h 2018-04-18 21:08:46.264280321 +0200 *************** *** 1114,1119 **** --- 1114,1122 ---- , BV_UDF , BV_UL , BV_WM + #ifdef FEAT_TERMINAL + , BV_TWSL + #endif , BV_COUNT /* must be the last one */ }; *************** *** 1133,1140 **** , WV_COLE #endif #ifdef FEAT_TERMINAL ! , WV_TK ! , WV_TMS #endif , WV_CRBIND #ifdef FEAT_LINEBREAK --- 1136,1143 ---- , WV_COLE #endif #ifdef FEAT_TERMINAL ! , WV_TWK ! , WV_TWS #endif , WV_CRBIND #ifdef FEAT_LINEBREAK *** ../vim-8.0.1742/src/terminal.c 2018-04-17 23:24:02.350755880 +0200 --- src/terminal.c 2018-04-21 19:44:44.445568525 +0200 *************** *** 42,47 **** --- 42,49 ---- * redirection. Probably in call to channel_set_pipes(). * - Win32: Redirecting output does not work, Test_terminal_redir_file() * is disabled. + * - Add test for 'termwinkey'. + * - libvterm: bringg back using // comments and trailing comma in enum * - When starting terminal window with shell in terminal, then using :gui to * switch to GUI, shell stops working. Scrollback seems wrong, command * running in shell is still running. *************** *** 215,231 **** *rows = 0; *cols = 0; ! if (*wp->w_p_tms != NUL) { ! char_u *p = vim_strchr(wp->w_p_tms, 'x'); /* Syntax of value was already checked when it's set. */ if (p == NULL) { minsize = TRUE; ! p = vim_strchr(wp->w_p_tms, '*'); } ! *rows = atoi((char *)wp->w_p_tms); *cols = atoi((char *)p + 1); } return minsize; --- 217,233 ---- *rows = 0; *cols = 0; ! if (*wp->w_p_tws != NUL) { ! char_u *p = vim_strchr(wp->w_p_tws, 'x'); /* Syntax of value was already checked when it's set. */ if (p == NULL) { minsize = TRUE; ! p = vim_strchr(wp->w_p_tws, '*'); } ! *rows = atoi((char *)wp->w_p_tws); *cols = atoi((char *)p + 1); } return minsize; *************** *** 2000,2007 **** * stored reference. */ in_terminal_loop = curbuf->b_term; ! if (*curwin->w_p_tk != NUL) ! termkey = string_to_key(curwin->w_p_tk, TRUE); position_cursor(curwin, &curbuf->b_term->tl_cursor_pos); may_set_cursor_props(curbuf->b_term); --- 2002,2009 ---- * stored reference. */ in_terminal_loop = curbuf->b_term; ! if (*curwin->w_p_twk != NUL) ! termkey = string_to_key(curwin->w_p_twk, TRUE); position_cursor(curwin, &curbuf->b_term->tl_cursor_pos); may_set_cursor_props(curbuf->b_term); *************** *** 2562,2570 **** /* If the number of lines that are stored goes over 'termscrollback' then * delete the first 10%. */ ! if (term->tl_scrollback.ga_len >= p_tlsl) { ! int todo = p_tlsl / 10; int i; curbuf = term->tl_buffer; --- 2564,2572 ---- /* If the number of lines that are stored goes over 'termscrollback' then * delete the first 10%. */ ! if (term->tl_scrollback.ga_len >= term->tl_buffer->b_p_twsl) { ! int todo = term->tl_buffer->b_p_twsl / 10; int i; curbuf = term->tl_buffer; *** ../vim-8.0.1742/src/testdir/test_terminal.vim 2018-04-17 23:24:02.350755880 +0200 --- src/testdir/test_terminal.vim 2018-04-18 21:43:18.865796194 +0200 *************** *** 273,279 **** func Test_terminal_scrollback() let buf = Run_shell_in_terminal({}) ! set terminalscroll=100 call writefile(range(150), 'Xtext') if has('win32') call term_sendkeys(buf, "type Xtext\") --- 273,279 ---- func Test_terminal_scrollback() let buf = Run_shell_in_terminal({}) ! set termwinscroll=100 call writefile(range(150), 'Xtext') if has('win32') call term_sendkeys(buf, "type Xtext\") *************** *** 289,295 **** call Stop_shell_in_terminal(buf) call term_wait(buf) exe buf . 'bwipe' ! set terminalscroll& endfunc func Test_terminal_size() --- 289,295 ---- call Stop_shell_in_terminal(buf) call term_wait(buf) exe buf . 'bwipe' ! set termwinscroll& endfunc func Test_terminal_size() *************** *** 1381,1391 **** exe buf . 'bwipe' endfunc ! func Test_terminal_termsize_option_fixed() if !CanRunVimInTerminal() return endif ! set termsize=6x40 let text = [] for n in range(10) call add(text, repeat(n, 50)) --- 1381,1391 ---- exe buf . 'bwipe' endfunc ! func Test_terminal_termwinsize_option_fixed() if !CanRunVimInTerminal() return endif ! set termwinsize=6x40 let text = [] for n in range(10) call add(text, repeat(n, 50)) *************** *** 1407,1421 **** call StopVimInTerminal(buf) call delete('Xwinsize') ! call assert_fails('set termsize=40', 'E474') ! call assert_fails('set termsize=10+40', 'E474') ! call assert_fails('set termsize=abc', 'E474') ! set termsize= endfunc ! func Test_terminal_termsize_option_zero() ! set termsize=0x0 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([winheight(win), winwidth(win)], term_getsize(buf)) --- 1407,1421 ---- call StopVimInTerminal(buf) call delete('Xwinsize') ! call assert_fails('set termwinsize=40', 'E474') ! call assert_fails('set termwinsize=10+40', 'E474') ! call assert_fails('set termwinsize=abc', 'E474') ! set termwinsize= endfunc ! func Test_terminal_termwinsize_option_zero() ! set termwinsize=0x0 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([winheight(win), winwidth(win)], term_getsize(buf)) *************** *** 1423,1429 **** call term_wait(buf) exe buf . 'bwipe' ! set termsize=7x0 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([7, winwidth(win)], term_getsize(buf)) --- 1423,1429 ---- call term_wait(buf) exe buf . 'bwipe' ! set termwinsize=7x0 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([7, winwidth(win)], term_getsize(buf)) *************** *** 1431,1437 **** call term_wait(buf) exe buf . 'bwipe' ! set termsize=0x33 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([winheight(win), 33], term_getsize(buf)) --- 1431,1437 ---- call term_wait(buf) exe buf . 'bwipe' ! set termwinsize=0x33 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([winheight(win), 33], term_getsize(buf)) *************** *** 1439,1449 **** call term_wait(buf) exe buf . 'bwipe' ! set termsize= endfunc ! func Test_terminal_termsize_mininmum() ! set termsize=10*50 vsplit let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) --- 1439,1449 ---- call term_wait(buf) exe buf . 'bwipe' ! set termwinsize= endfunc ! func Test_terminal_termwinsize_mininmum() ! set termwinsize=10*50 vsplit let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) *************** *** 1469,1475 **** call term_wait(buf) exe buf . 'bwipe' ! set termsize=0*0 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([winheight(win), winwidth(win)], term_getsize(buf)) --- 1469,1475 ---- call term_wait(buf) exe buf . 'bwipe' ! set termwinsize=0*0 let buf = Run_shell_in_terminal({}) let win = bufwinid(buf) call assert_equal([winheight(win), winwidth(win)], term_getsize(buf)) *************** *** 1477,1481 **** call term_wait(buf) exe buf . 'bwipe' ! set termsize= endfunc --- 1477,1481 ---- call term_wait(buf) exe buf . 'bwipe' ! set termwinsize= endfunc *** ../vim-8.0.1742/src/testdir/gen_opt_test.vim 2018-02-22 21:06:44.570818781 +0100 --- src/testdir/gen_opt_test.vim 2018-04-18 21:54:04.173356458 +0200 *************** *** 130,137 **** \ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']], \ 'term': [[], []], \ 'termguicolors': [[], []], - \ 'termsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']], \ 'termencoding': [has('gui_gtk') ? [] : ['', 'utf-8'], ['xxx']], \ 'toolbar': [['', 'icons', 'text'], ['xxx']], \ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']], \ 'ttymouse': [['', 'xterm'], ['xxx']], --- 130,138 ---- \ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']], \ 'term': [[], []], \ 'termguicolors': [[], []], \ 'termencoding': [has('gui_gtk') ? [] : ['', 'utf-8'], ['xxx']], + \ 'termsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']], + \ 'termwinsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']], \ 'toolbar': [['', 'icons', 'text'], ['xxx']], \ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']], \ 'ttymouse': [['', 'xterm'], ['xxx']], *** ../vim-8.0.1742/runtime/doc/options.txt 2018-04-15 23:45:12.982388377 +0200 --- runtime/doc/options.txt 2018-04-21 18:39:24.379314960 +0200 *************** *** 7822,7830 **** Note that the "cterm" attributes are still used, not the "gui" ones. NOTE: This option is reset when 'compatible' is set. ! *'terminalscroll'* *'tlsl'* ! 'terminalscroll' 'tlsl' number (default 10000) ! global {not in Vi} {not available when compiled without the |+terminal| feature} --- 7935,7943 ---- Note that the "cterm" attributes are still used, not the "gui" ones. NOTE: This option is reset when 'compatible' is set. ! *'termwinscroll'* *'twsl'* ! 'termwinscroll' 'twsl' number (default 10000) ! local to buffer {not in Vi} {not available when compiled without the |+terminal| feature} *************** *** 7832,7852 **** first 10% of the scrollback lines are deleted. This is just to reduce the memory usage. See |Terminal-Normal|. ! *'termkey'* *'tk'* ! 'termkey' 'tk' string (default "") local to window {not in Vi} The key that starts a CTRL-W command in a terminal window. Other keys are sent to the job running in the window. The <> notation can be used, e.g.: > ! :set termkey= < The string must be one key stroke but can be multiple bytes. When not set CTRL-W is used, so that CTRL-W : gets you to the command ! line. If 'termkey' is set to CTRL-L then CTRL-L : gets you to the command line. ! *'termsize'* *'tms'* ! 'termsize' 'tms' string (default "") local to window {not in Vi} Size of the |terminal| window. Format: {rows}x{columns} or --- 7945,7965 ---- first 10% of the scrollback lines are deleted. This is just to reduce the memory usage. See |Terminal-Normal|. ! *'termwinkey'* *'twk'* ! 'termwinkey' 'twk' string (default "") local to window {not in Vi} The key that starts a CTRL-W command in a terminal window. Other keys are sent to the job running in the window. The <> notation can be used, e.g.: > ! :set termwinkey= < The string must be one key stroke but can be multiple bytes. When not set CTRL-W is used, so that CTRL-W : gets you to the command ! line. If 'termwinkey' is set to CTRL-L then CTRL-L : gets you to the command line. ! *'termwinsize'* *'tws'* ! 'termwinsize' 'tws' string (default "") local to window {not in Vi} Size of the |terminal| window. Format: {rows}x{columns} or *** ../vim-8.0.1742/runtime/doc/quickref.txt 2018-01-31 21:48:25.224668815 +0100 --- runtime/doc/quickref.txt 2018-04-18 20:53:30.470956798 +0200 *************** *** 922,927 **** --- 927,935 ---- 'termbidi' 'tbidi' terminal takes care of bi-directionality 'termencoding' 'tenc' character encoding used by the terminal 'termguicolors' 'tgc' use GUI colors for the terminal + 'termwinkey' 'twk' key that precedes a Vim command in a terminal + 'termwinscroll' 'twsl' max number of scrollback lines in a terminal window + 'termwinsize' 'tws' size of a terminal window 'terse' shorten some messages 'textauto' 'ta' obsolete, use 'fileformats' 'textmode' 'tx' obsolete, use 'fileformat' *** ../vim-8.0.1742/runtime/doc/terminal.txt 2018-04-16 16:21:43.962795866 +0200 --- runtime/doc/terminal.txt 2018-04-20 22:34:48.662284878 +0200 *************** *** 80,95 **** evaluating an expression. CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C| ! See option 'termkey' for specifying another key instead of CTRL-W that ! will work like CTRL-W. However, typing 'termkey' twice sends 'termkey' to ! the job. For example: ! 'termkey' CTRL-W move focus to the next window ! 'termkey' : enter an Ex command ! 'termkey' 'termkey' send 'termkey' to the job in the terminal ! 'termkey' . send a CTRL-W to the job in the terminal ! 'termkey' N go to terminal Normal mode, see below ! 'termkey' CTRL-N same as CTRL-W N ! 'termkey' CTRL-C same as |t_CTRL-W_CTRL-C| *t_CTRL-\_CTRL-N* The special key combination CTRL-\ CTRL-N can be used to switch to Normal mode, just like this works in any other mode. --- 80,95 ---- evaluating an expression. CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C| ! See option 'termwinkey' for specifying another key instead of CTRL-W that ! will work like CTRL-W. However, typing 'termwinkey' twice sends 'termwinkey' ! to the job. For example: ! 'termwinkey' CTRL-W move focus to the next window ! 'termwinkey' : enter an Ex command ! 'termwinkey' 'termwinkey' send 'termwinkey' to the job in the terminal ! 'termwinkey' . send a CTRL-W to the job in the terminal ! 'termwinkey' N go to terminal Normal mode, see below ! 'termwinkey' CTRL-N same as CTRL-W N ! 'termwinkey' CTRL-C same as |t_CTRL-W_CTRL-C| *t_CTRL-\_CTRL-N* The special key combination CTRL-\ CTRL-N can be used to switch to Normal mode, just like this works in any other mode. *************** *** 125,131 **** Size and color ~ *terminal-size-color* ! See option 'termsize' for controlling the size of the terminal window. (TODO: scrolling when the terminal is larger than the window) The job running in the terminal can change the colors. The default foreground --- 125,131 ---- Size and color ~ *terminal-size-color* ! See option 'termwinsize' for controlling the size of the terminal window. (TODO: scrolling when the terminal is larger than the window) The job running in the terminal can change the colors. The default foreground *************** *** 139,145 **** hi Terminal ctermbg=lightgrey ctermfg=blue guibg=lightgrey guifg=blue < *g:terminal_ansi_colors* ! In GUI mode or with |termguicolors|, the 16 ANSI colors used by default in new terminal windows may be configured using the variable `g:terminal_ansi_colors`, which should be a list of 16 color names or hexadecimal color codes, similar to those accepted by |highlight-guifg|. When --- 139,145 ---- hi Terminal ctermbg=lightgrey ctermfg=blue guibg=lightgrey guifg=blue < *g:terminal_ansi_colors* ! In GUI mode or with 'termguicolors', the 16 ANSI colors used by default in new terminal windows may be configured using the variable `g:terminal_ansi_colors`, which should be a list of 16 color names or hexadecimal color codes, similar to those accepted by |highlight-guifg|. When *************** *** 269,290 **** *terminal-resizing* The size of the terminal can be in one of three modes: ! 1. The 'termsize' option is empty: The terminal size follows the window size. ! The minimal size is 2 screen lines with 10 cells. ! 2. The 'termsize' option is "rows*cols", where "rows" is the minimal number of ! screen rows and "cols" is the minimal number of cells. ! 3. The 'termsize' option is "rowsXcols" (where the x is upper or lower case). ! The terminal size is fixed to the specified number of screen lines and ! cells. If the window is bigger there will be unused empty space. If the window is smaller than the terminal size, only part of the terminal can be seen (the lower-left part). The |term_getsize()| function can be used to get the current size of the terminal. |term_setsize()| can be used only when in the first or second mode, ! not when 'termsize' is "rowsXcols". Terminal-Job and Terminal-Normal mode ~ --- 269,290 ---- *terminal-resizing* The size of the terminal can be in one of three modes: ! 1. The 'termwinsize' option is empty: The terminal size follows the window ! size. The minimal size is 2 screen lines with 10 cells. ! 2. The 'termwinsize' option is "rows*cols", where "rows" is the minimal number ! of screen rows and "cols" is the minimal number of cells. ! 3. The 'termwinsize' option is "rowsXcols" (where the x is upper or lower ! case). The terminal size is fixed to the specified number of screen lines ! and cells. If the window is bigger there will be unused empty space. If the window is smaller than the terminal size, only part of the terminal can be seen (the lower-left part). The |term_getsize()| function can be used to get the current size of the terminal. |term_setsize()| can be used only when in the first or second mode, ! not when 'termwinsize' is "rowsXcols". Terminal-Job and Terminal-Normal mode ~ *************** *** 294,300 **** The terminal contents can change at any time. This is called Terminal-Job mode. ! Use CTRL-W N (or 'termkey' N) to switch to Terminal-Normal mode. Now the contents of the terminal window is under control of Vim, the job output is suspended. CTRL-\ CTRL-N does the same. --- 294,300 ---- The terminal contents can change at any time. This is called Terminal-Job mode. ! Use CTRL-W N (or 'termwinkey' N) to switch to Terminal-Normal mode. Now the contents of the terminal window is under control of Vim, the job output is suspended. CTRL-\ CTRL-N does the same. *************** *** 316,322 **** When the job outputs lines in the terminal, such that the contents scrolls off the top, those lines are remembered and can be seen in Terminal-Normal mode. ! The number of lines is limited by the 'terminalscroll' option. When going over this limit, the first 10% of the scrolled lins are deleted and are lost. --- 316,322 ---- When the job outputs lines in the terminal, such that the contents scrolls off the top, those lines are remembered and can be seen in Terminal-Normal mode. ! The number of lines is limited by the 'termwinscroll' option. When going over this limit, the first 10% of the scrolled lins are deleted and are lost. *** ../vim-8.0.1742/runtime/optwin.vim 2018-02-27 17:03:08.793704611 +0100 --- runtime/optwin.vim 2018-04-18 20:56:47.765622498 +0200 *************** *** 506,517 **** call BinOptionL("crb") endif if has("terminal") ! call append("$", "termsize\tsize of a terminal window") call append("$", "\t(local to window)") ! call OptionL("tms") ! call append("$", "termkey\tkey that precedes Vim commands in a terminal window") call append("$", "\t(local to window)") ! call OptionL("tk") if exists("&winptydll") call append("$", "winptydll\tname of the winpty dynamic library") call OptionG("winptydll", &winptydll) --- 506,520 ---- call BinOptionL("crb") endif if has("terminal") ! call append("$", "termwinsize\tsize of a terminal window") call append("$", "\t(local to window)") ! call OptionL("tws") ! call append("$", "termwinkey\tkey that precedes Vim commands in a terminal window") call append("$", "\t(local to window)") ! call OptionL("twk") ! call append("$", "termwinscroll\tmax number of lines to keep for scrollback in a terminal window") ! call append("$", "\t(local to window)") ! call OptionL("twsl") if exists("&winptydll") call append("$", "winptydll\tname of the winpty dynamic library") call OptionG("winptydll", &winptydll) *** ../vim-8.0.1742/src/version.c 2018-04-21 19:49:02.528104537 +0200 --- src/version.c 2018-04-21 20:00:14.279421211 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1743, /**/ -- Marriage isn't a word. It's a sentence. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///