diff src/terminal.c @ 12259:48eac9bc2f82 v8.0.1009

patch 8.0.1009: Xterm cursor blinking status may be inverted commit https://github.com/vim/vim/commit/4db2554954056f21f2ba4cf4988c652745d7042a Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 28 22:43:05 2017 +0200 patch 8.0.1009: Xterm cursor blinking status may be inverted Problem: Xterm cursor blinking status may be inverted. Solution: Use another request to get the blink status and compare with the cursor style report
author Christian Brabandt <cb@256bit.org>
date Mon, 28 Aug 2017 22:45:04 +0200
parents d0b039e2ed56
children e3bde71afff0
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -39,7 +39,6 @@
  *
  * TODO:
  * - ":term NONE" does not work in MS-Windows.
- * - better check for blinking - reply from Thomas Dickey Aug 22
  * - test for writing lines to terminal job does not work on MS-Windows
  * - implement term_setsize()
  * - add test for giving error for invalid 'termsize' value.
@@ -2482,7 +2481,8 @@ f_term_getcursor(typval_T *argvars, typv
     if (d != NULL)
     {
 	dict_add_nr_str(d, "visible", term->tl_cursor_visible, NULL);
-	dict_add_nr_str(d, "blink", term->tl_cursor_blink, NULL);
+	dict_add_nr_str(d, "blink", blink_state_is_inverted()
+		       ? !term->tl_cursor_blink : term->tl_cursor_blink, NULL);
 	dict_add_nr_str(d, "shape", term->tl_cursor_shape, NULL);
 	dict_add_nr_str(d, "color", 0L, term->tl_cursor_color == NULL
 				       ? (char_u *)"" : term->tl_cursor_color);