Skip to content

Commit 4cc93dc

Browse files
committed
patch 8.0.0778: in a terminal the cursor may be hidden
Problem: In a terminal the cursor may be hidden and screen updating lags behind. (Nazri Ramliy) Solution: Switch the cursor on and flush output when needed. (Ozaki Kiichi)
1 parent a1b5b09 commit 4cc93dc

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/terminal.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,14 @@ term_write_job_output(term_T *term, char_u *msg, size_t len)
321321
static void
322322
update_cursor(term_T *term, int redraw)
323323
{
324-
/* TODO: this should not always be needed */
325324
setcursor();
326-
if (redraw && term->tl_buffer == curbuf && term->tl_cursor_visible)
325+
if (redraw && term->tl_buffer == curbuf)
327326
{
327+
if (term->tl_cursor_visible)
328+
cursor_on();
328329
out_flush();
329330
#ifdef FEAT_GUI
330-
if (gui.in_use)
331+
if (gui.in_use && term->tl_cursor_visible)
331332
gui_update_cursor(FALSE, FALSE);
332333
#endif
333334
}

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+
778,
772774
/**/
773775
777,
774776
/**/

0 commit comments

Comments
 (0)