Skip to content

Commit 12d93ee

Browse files
committed
patch 8.0.0820: GUI: cursor in terminal window lags behind
Problem: GUI: cursor in terminal window lags behind. Solution: call gui_update_cursor() under different conditions. (Ozaki Kiichi, closes #1893)
1 parent 0e23e9c commit 12d93ee

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/terminal.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
* job finishes).
5252
* - add option values to the command:
5353
* :term <24x80> <close> vim notes.txt
54+
* - support different cursor shapes, colors and attributes
55+
* - make term_getcursor() return type (none/block/bar/underline) and
56+
* attributes (color, blink, etc.)
5457
* - To set BS correctly, check get_stty(); Pass the fd of the pty.
5558
* - do not store terminal window in viminfo. Or prefix term:// ?
5659
* - add a character in :ls output
@@ -359,7 +362,7 @@ update_cursor(term_T *term, int redraw)
359362
cursor_on();
360363
out_flush();
361364
#ifdef FEAT_GUI
362-
if (gui.in_use && term->tl_cursor_visible)
365+
if (gui.in_use)
363366
gui_update_cursor(FALSE, FALSE);
364367
#endif
365368
}
@@ -1034,7 +1037,7 @@ handle_movecursor(
10341037
if (term->tl_buffer == curbuf)
10351038
{
10361039
may_toggle_cursor(term);
1037-
update_cursor(term, TRUE);
1040+
update_cursor(term, term->tl_cursor_visible);
10381041
}
10391042

10401043
return 1;
@@ -1180,11 +1183,12 @@ term_channel_closed(channel_T *ch)
11801183
/* Need to break out of vgetc(). */
11811184
ins_char_typebuf(K_IGNORE);
11821185

1183-
if (curbuf->b_term != NULL)
1186+
term = curbuf->b_term;
1187+
if (term != NULL)
11841188
{
1185-
if (curbuf->b_term->tl_job == ch->ch_job)
1189+
if (term->tl_job == ch->ch_job)
11861190
maketitle();
1187-
update_cursor(curbuf->b_term, TRUE);
1191+
update_cursor(term, term->tl_cursor_visible);
11881192
}
11891193
}
11901194
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
820,
772774
/**/
773775
819,
774776
/**/

0 commit comments

Comments
 (0)