Mercurial > vim
comparison src/terminal.c @ 11880:45558e0507e8 v8.0.0820
patch 8.0.0820: GUI: cursor in terminal window lags behind
commit https://github.com/vim/vim/commit/12d93ee26d4290321ed0cc3d0493b966d1475a66
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 30 19:02:02 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 30 Jul 2017 19:15:05 +0200 |
parents | a83b19a8d7e4 |
children | 69e7379f46db |
comparison
equal
deleted
inserted
replaced
11879:b4616f82466a | 11880:45558e0507e8 |
---|---|
49 * - Need an option or argument to drop the window+buffer right away, to be | 49 * - Need an option or argument to drop the window+buffer right away, to be |
50 * used for a shell or Vim. 'termfinish'; "close", "open" (open window when | 50 * used for a shell or Vim. 'termfinish'; "close", "open" (open window when |
51 * job finishes). | 51 * job finishes). |
52 * - add option values to the command: | 52 * - add option values to the command: |
53 * :term <24x80> <close> vim notes.txt | 53 * :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.) | |
54 * - To set BS correctly, check get_stty(); Pass the fd of the pty. | 57 * - To set BS correctly, check get_stty(); Pass the fd of the pty. |
55 * - do not store terminal window in viminfo. Or prefix term:// ? | 58 * - do not store terminal window in viminfo. Or prefix term:// ? |
56 * - add a character in :ls output | 59 * - add a character in :ls output |
57 * - add 't' to mode() | 60 * - add 't' to mode() |
58 * - when closing window and job has not ended, make terminal hidden? | 61 * - when closing window and job has not ended, make terminal hidden? |
357 { | 360 { |
358 if (term->tl_cursor_visible) | 361 if (term->tl_cursor_visible) |
359 cursor_on(); | 362 cursor_on(); |
360 out_flush(); | 363 out_flush(); |
361 #ifdef FEAT_GUI | 364 #ifdef FEAT_GUI |
362 if (gui.in_use && term->tl_cursor_visible) | 365 if (gui.in_use) |
363 gui_update_cursor(FALSE, FALSE); | 366 gui_update_cursor(FALSE, FALSE); |
364 #endif | 367 #endif |
365 } | 368 } |
366 } | 369 } |
367 | 370 |
1032 position_cursor(wp, &pos); | 1035 position_cursor(wp, &pos); |
1033 } | 1036 } |
1034 if (term->tl_buffer == curbuf) | 1037 if (term->tl_buffer == curbuf) |
1035 { | 1038 { |
1036 may_toggle_cursor(term); | 1039 may_toggle_cursor(term); |
1037 update_cursor(term, TRUE); | 1040 update_cursor(term, term->tl_cursor_visible); |
1038 } | 1041 } |
1039 | 1042 |
1040 return 1; | 1043 return 1; |
1041 } | 1044 } |
1042 | 1045 |
1178 redraw_statuslines(); | 1181 redraw_statuslines(); |
1179 | 1182 |
1180 /* Need to break out of vgetc(). */ | 1183 /* Need to break out of vgetc(). */ |
1181 ins_char_typebuf(K_IGNORE); | 1184 ins_char_typebuf(K_IGNORE); |
1182 | 1185 |
1183 if (curbuf->b_term != NULL) | 1186 term = curbuf->b_term; |
1184 { | 1187 if (term != NULL) |
1185 if (curbuf->b_term->tl_job == ch->ch_job) | 1188 { |
1189 if (term->tl_job == ch->ch_job) | |
1186 maketitle(); | 1190 maketitle(); |
1187 update_cursor(curbuf->b_term, TRUE); | 1191 update_cursor(term, term->tl_cursor_visible); |
1188 } | 1192 } |
1189 } | 1193 } |
1190 } | 1194 } |
1191 | 1195 |
1192 /* | 1196 /* |