# HG changeset patch # User Christian Brabandt # Date 1503427504 -7200 # Node ID 48394f51e6afc98a37ac675c0e8b15f710d435dd # Parent 038f85d4da0cea2f8305d7ae12a21416e69c03fc patch 8.0.0984: terminal blinking cursor not correct in the GUI commit https://github.com/vim/vim/commit/5830232c021102e47a4e6fc81857604e4a031ddf Author: Bram Moolenaar Date: Tue Aug 22 20:33:53 2017 +0200 patch 8.0.0984: terminal blinking cursor not correct in the GUI Problem: Terminal blinking cursor not correct in the GUI. Solution: Set blinkoff correctly. Also make the cursor blink on MS-Windows by default. (Ken Takata) diff --git a/src/terminal.c b/src/terminal.c --- a/src/terminal.c +++ b/src/terminal.c @@ -43,6 +43,10 @@ * - add test for giving error for invalid 'termsize' value. * - support minimal size when 'termsize' is "rows*cols". * - support minimal size when 'termsize' is empty? + * - do not set bufhidden to "hide"? works like a buffer with changes. + * document that CTRL-W :hide can be used. + * - command argument with spaces doesn't work #1999 + * :terminal ls dir\ with\ spaces * - implement job options when starting a terminal. Allow: * "in_io", "in_top", "in_bot", "in_name", "in_buf" "out_io", "out_name", "out_buf", "out_modifiable", "out_msg" @@ -845,7 +849,7 @@ add_scrollback_line_to_buffer(term_T *te int empty = (buf->b_ml.ml_flags & ML_EMPTY); linenr_T lnum = buf->b_ml.ml_line_count; -#ifdef _WIN32 +#ifdef WIN3264 if (!enc_utf8 && enc_codepage > 0) { WCHAR *ret = NULL; @@ -1295,7 +1299,7 @@ term_get_cursor_shape(guicolor_T *fg, gu { entry.blinkwait = 700; entry.blinkon = 400; - entry.blinkon = 250; + entry.blinkoff = 250; } *fg = gui.back_pixel; if (term->tl_cursor_color == NULL) @@ -1487,7 +1491,7 @@ terminal_loop(void) goto theend; } } -# ifdef _WIN32 +# ifdef WIN3264 if (!enc_utf8 && has_mbyte && c >= 0x80) { WCHAR wc; @@ -2120,7 +2124,7 @@ term_update_window(win_T *wp) ScreenLinesUC[off] = NUL; } } -# ifdef _WIN32 +# ifdef WIN3264 else if (has_mbyte && c >= 0x80) { char_u mb[MB_MAXBYTES+1]; @@ -2263,8 +2267,15 @@ create_vterm(term_T *term, int rows, int /* Allow using alternate screen. */ vterm_screen_enable_altscreen(screen, 1); - /* We do not want a blinking cursor by default. */ + /* For unix do not use a blinking cursor. In an xterm this causes the + * cursor to blink if it's blinking in the xterm. + * We do want a blinking cursor by default on Windows, since that's what + * the default is for a console. */ +#ifdef WIN3264 + value.boolean = 1; +#else value.boolean = 0; +#endif vterm_state_set_termprop(vterm_obtain_state(vterm), VTERM_PROP_CURSORBLINK, &value); } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 984, +/**/ 983, /**/ 982,