Skip to content

Commit 5830232

Browse files
committed
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)
1 parent 3f9a1ff commit 5830232

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

src/terminal.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
* - add test for giving error for invalid 'termsize' value.
4444
* - support minimal size when 'termsize' is "rows*cols".
4545
* - support minimal size when 'termsize' is empty?
46+
* - do not set bufhidden to "hide"? works like a buffer with changes.
47+
* document that CTRL-W :hide can be used.
48+
* - command argument with spaces doesn't work #1999
49+
* :terminal ls dir\ with\ spaces
4650
* - implement job options when starting a terminal. Allow:
4751
* "in_io", "in_top", "in_bot", "in_name", "in_buf"
4852
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
@@ -845,7 +849,7 @@ add_scrollback_line_to_buffer(term_T *term, char_u *text, int len)
845849
int empty = (buf->b_ml.ml_flags & ML_EMPTY);
846850
linenr_T lnum = buf->b_ml.ml_line_count;
847851

848-
#ifdef _WIN32
852+
#ifdef WIN3264
849853
if (!enc_utf8 && enc_codepage > 0)
850854
{
851855
WCHAR *ret = NULL;
@@ -1295,7 +1299,7 @@ term_get_cursor_shape(guicolor_T *fg, guicolor_T *bg)
12951299
{
12961300
entry.blinkwait = 700;
12971301
entry.blinkon = 400;
1298-
entry.blinkon = 250;
1302+
entry.blinkoff = 250;
12991303
}
13001304
*fg = gui.back_pixel;
13011305
if (term->tl_cursor_color == NULL)
@@ -1487,7 +1491,7 @@ terminal_loop(void)
14871491
goto theend;
14881492
}
14891493
}
1490-
# ifdef _WIN32
1494+
# ifdef WIN3264
14911495
if (!enc_utf8 && has_mbyte && c >= 0x80)
14921496
{
14931497
WCHAR wc;
@@ -2120,7 +2124,7 @@ term_update_window(win_T *wp)
21202124
ScreenLinesUC[off] = NUL;
21212125
}
21222126
}
2123-
# ifdef _WIN32
2127+
# ifdef WIN3264
21242128
else if (has_mbyte && c >= 0x80)
21252129
{
21262130
char_u mb[MB_MAXBYTES+1];
@@ -2263,8 +2267,15 @@ create_vterm(term_T *term, int rows, int cols)
22632267
/* Allow using alternate screen. */
22642268
vterm_screen_enable_altscreen(screen, 1);
22652269

2266-
/* We do not want a blinking cursor by default. */
2270+
/* For unix do not use a blinking cursor. In an xterm this causes the
2271+
* cursor to blink if it's blinking in the xterm.
2272+
* We do want a blinking cursor by default on Windows, since that's what
2273+
* the default is for a console. */
2274+
#ifdef WIN3264
2275+
value.boolean = 1;
2276+
#else
22672277
value.boolean = 0;
2278+
#endif
22682279
vterm_state_set_termprop(vterm_obtain_state(vterm),
22692280
VTERM_PROP_CURSORBLINK, &value);
22702281
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
984,
772774
/**/
773775
983,
774776
/**/

0 commit comments

Comments
 (0)