Skip to content

Instantly share code, notes, and snippets.

@ichizok
Last active July 26, 2017 16:41
Show Gist options
  • Select an option

  • Save ichizok/9dafd126bb6f6d5f79878a18f5665e6f to your computer and use it in GitHub Desktop.

Select an option

Save ichizok/9dafd126bb6f6d5f79878a18f5665e6f to your computer and use it in GitHub Desktop.
fix cursor visibility
diff --git a/src/terminal.c b/src/terminal.c
index 9833a43b7..ea60f0783 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -322,11 +322,13 @@ update_cursor(term_T *term, int redraw)
{
/* TODO: this should not always be needed */
setcursor();
- if (redraw && term->tl_buffer == curbuf && term->tl_cursor_visible)
+ if (redraw && term->tl_buffer == curbuf)
{
+ if (term->tl_cursor_visible)
+ cursor_on();
out_flush();
#ifdef FEAT_GUI
- if (gui.in_use)
+ if (gui.in_use && term->tl_cursor_visible)
gui_update_cursor(FALSE, FALSE);
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment