* while, if the terminal window is visible, the screen contents is drawn.
*
* TODO:
- * - do not store terminal buffer in viminfo
+ * - include functions from #1871
+ * - do not store terminal buffer in viminfo. Or prefix term:// ?
* - Add a scrollback buffer (contains lines to scroll off the top).
* Can use the buf_T lines, store attributes somewhere else?
* - When the job ends:
vterm_screen_flush_damage(vterm_obtain_screen(vterm));
}
+ static void
+update_cursor()
+{
+ /* TODO: this should not always be needed */
+ setcursor();
+ out_flush();
+#ifdef FEAT_GUI
+ if (gui.in_use)
+ gui_update_cursor(FALSE, FALSE);
+#endif
+}
+
/*
* Invoked when "msg" output from a job was received. Write it to the terminal
* of "buffer".
/* TODO: only update once in a while. */
update_screen(0);
- setcursor();
- out_flush();
+ update_cursor();
}
/*
{
/* TODO: skip screen update when handling a sequence of keys. */
update_screen(0);
- setcursor();
- out_flush();
+ update_cursor();
++no_mapping;
++allow_keys;
got_int = FALSE;
if (did_one)
{
redraw_statuslines();
- setcursor();
- out_flush();
+ update_cursor();
}
if (curbuf->b_term != NULL && curbuf->b_term->tl_job == job)
maketitle();
}
if (is_current)
- {
- setcursor();
- out_flush();
- }
+ update_cursor();
return 1;
}