Mercurial > vim
comparison src/terminal.c @ 13742:a34b1323286c v8.0.1743
patch 8.0.1743: terminal window options are named inconsistently
commit https://github.com/vim/vim/commit/6d150f783d5d3820fe69734dda1e79b8276a84d2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 21 20:03:20 2018 +0200
patch 8.0.1743: terminal window options are named inconsistently
Problem: Terminal window options are named inconsistently.
Solution: prefix terminal window options with "termwin". Keep the old names
for now as an alias.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 21 Apr 2018 20:15:07 +0200 |
parents | 7d2039b2ecc8 |
children | 260256caac38 |
comparison
equal
deleted
inserted
replaced
13741:ef2ae120f25c | 13742:a34b1323286c |
---|---|
40 * TODO: | 40 * TODO: |
41 * - Win32: Make terminal used for :!cmd in the GUI work better. Allow for | 41 * - Win32: Make terminal used for :!cmd in the GUI work better. Allow for |
42 * redirection. Probably in call to channel_set_pipes(). | 42 * redirection. Probably in call to channel_set_pipes(). |
43 * - Win32: Redirecting output does not work, Test_terminal_redir_file() | 43 * - Win32: Redirecting output does not work, Test_terminal_redir_file() |
44 * is disabled. | 44 * is disabled. |
45 * - Add test for 'termwinkey'. | |
46 * - libvterm: bringg back using // comments and trailing comma in enum | |
45 * - When starting terminal window with shell in terminal, then using :gui to | 47 * - When starting terminal window with shell in terminal, then using :gui to |
46 * switch to GUI, shell stops working. Scrollback seems wrong, command | 48 * switch to GUI, shell stops working. Scrollback seems wrong, command |
47 * running in shell is still running. | 49 * running in shell is still running. |
48 * - GUI: when using tabs, focus in terminal, click on tab does not work. | 50 * - GUI: when using tabs, focus in terminal, click on tab does not work. |
49 * - handle_moverect() scrolls one line at a time. Postpone scrolling, count | 51 * - handle_moverect() scrolls one line at a time. Postpone scrolling, count |
213 int minsize = FALSE; | 215 int minsize = FALSE; |
214 | 216 |
215 *rows = 0; | 217 *rows = 0; |
216 *cols = 0; | 218 *cols = 0; |
217 | 219 |
218 if (*wp->w_p_tms != NUL) | 220 if (*wp->w_p_tws != NUL) |
219 { | 221 { |
220 char_u *p = vim_strchr(wp->w_p_tms, 'x'); | 222 char_u *p = vim_strchr(wp->w_p_tws, 'x'); |
221 | 223 |
222 /* Syntax of value was already checked when it's set. */ | 224 /* Syntax of value was already checked when it's set. */ |
223 if (p == NULL) | 225 if (p == NULL) |
224 { | 226 { |
225 minsize = TRUE; | 227 minsize = TRUE; |
226 p = vim_strchr(wp->w_p_tms, '*'); | 228 p = vim_strchr(wp->w_p_tws, '*'); |
227 } | 229 } |
228 *rows = atoi((char *)wp->w_p_tms); | 230 *rows = atoi((char *)wp->w_p_tws); |
229 *cols = atoi((char *)p + 1); | 231 *cols = atoi((char *)p + 1); |
230 } | 232 } |
231 return minsize; | 233 return minsize; |
232 } | 234 } |
233 | 235 |
1998 * might be closed while waiting for a character, e.g. typing "exit" in a | 2000 * might be closed while waiting for a character, e.g. typing "exit" in a |
1999 * shell and ++close was used. Therefore use curbuf->b_term instead of a | 2001 * shell and ++close was used. Therefore use curbuf->b_term instead of a |
2000 * stored reference. */ | 2002 * stored reference. */ |
2001 in_terminal_loop = curbuf->b_term; | 2003 in_terminal_loop = curbuf->b_term; |
2002 | 2004 |
2003 if (*curwin->w_p_tk != NUL) | 2005 if (*curwin->w_p_twk != NUL) |
2004 termkey = string_to_key(curwin->w_p_tk, TRUE); | 2006 termkey = string_to_key(curwin->w_p_twk, TRUE); |
2005 position_cursor(curwin, &curbuf->b_term->tl_cursor_pos); | 2007 position_cursor(curwin, &curbuf->b_term->tl_cursor_pos); |
2006 may_set_cursor_props(curbuf->b_term); | 2008 may_set_cursor_props(curbuf->b_term); |
2007 | 2009 |
2008 while (blocking || vpeekc_nomap() != NUL) | 2010 while (blocking || vpeekc_nomap() != NUL) |
2009 { | 2011 { |
2560 { | 2562 { |
2561 term_T *term = (term_T *)user; | 2563 term_T *term = (term_T *)user; |
2562 | 2564 |
2563 /* If the number of lines that are stored goes over 'termscrollback' then | 2565 /* If the number of lines that are stored goes over 'termscrollback' then |
2564 * delete the first 10%. */ | 2566 * delete the first 10%. */ |
2565 if (term->tl_scrollback.ga_len >= p_tlsl) | 2567 if (term->tl_scrollback.ga_len >= term->tl_buffer->b_p_twsl) |
2566 { | 2568 { |
2567 int todo = p_tlsl / 10; | 2569 int todo = term->tl_buffer->b_p_twsl / 10; |
2568 int i; | 2570 int i; |
2569 | 2571 |
2570 curbuf = term->tl_buffer; | 2572 curbuf = term->tl_buffer; |
2571 for (i = 0; i < todo; ++i) | 2573 for (i = 0; i < todo; ++i) |
2572 { | 2574 { |