0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.0.1821: cursor in terminal window moves when pressing CTRL-W

Problem:    Cursor in terminal window moves when pressing CTRL-W. (Dominique
            Pelle)
Solution:   Do not more the cursor or redraw when not in Terminal-Normal mode.
            (closes #2904)
This commit is contained in:
Bram Moolenaar 2018-05-12 20:36:24 +02:00
parent cd8fb449d6
commit 2bc799579d
2 changed files with 17 additions and 14 deletions

View File

@ -1606,6 +1606,7 @@ move_terminal_to_buffer(term_T *term)
vterm_state_get_default_colors(vterm_obtain_state(term->tl_vterm),
&term->tl_default_color.fg, &term->tl_default_color.bg);
if (term->tl_normal_mode)
FOR_ALL_WINDOWS(wp)
{
if (wp->w_buffer == term->tl_buffer)
@ -1688,11 +1689,11 @@ term_enter_normal_mode(void)
{
term_T *term = curbuf->b_term;
set_terminal_mode(term, TRUE);
/* Append the current terminal contents to the buffer. */
move_terminal_to_buffer(term);
set_terminal_mode(term, TRUE);
/* Move the window cursor to the position of the cursor in the
* terminal. */
curwin->w_cursor.lnum = term->tl_scrollback_scrolled

View File

@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1821,
/**/
1820,
/**/