Mercurial > vim
comparison src/terminal.c @ 11792:4bc1f94afc34 v8.0.0778
patch 8.0.0778: in a terminal the cursor may be hidden
commit https://github.com/vim/vim/commit/4cc93dc85a7aaf6bb1ccccc466f8d5fa523094e4
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 26 21:49:37 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 26 Jul 2017 22:00:06 +0200 |
parents | 4dfebc1b2674 |
children | 2e7e77e28063 |
comparison
equal
deleted
inserted
replaced
11791:40665c258263 | 11792:4bc1f94afc34 |
---|---|
319 } | 319 } |
320 | 320 |
321 static void | 321 static void |
322 update_cursor(term_T *term, int redraw) | 322 update_cursor(term_T *term, int redraw) |
323 { | 323 { |
324 /* TODO: this should not always be needed */ | |
325 setcursor(); | 324 setcursor(); |
326 if (redraw && term->tl_buffer == curbuf && term->tl_cursor_visible) | 325 if (redraw && term->tl_buffer == curbuf) |
327 { | 326 { |
327 if (term->tl_cursor_visible) | |
328 cursor_on(); | |
328 out_flush(); | 329 out_flush(); |
329 #ifdef FEAT_GUI | 330 #ifdef FEAT_GUI |
330 if (gui.in_use) | 331 if (gui.in_use && term->tl_cursor_visible) |
331 gui_update_cursor(FALSE, FALSE); | 332 gui_update_cursor(FALSE, FALSE); |
332 #endif | 333 #endif |
333 } | 334 } |
334 } | 335 } |
335 | 336 |