summaryrefslogtreecommitdiff
path: root/app/xterm
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2018-05-20 09:25:39 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2018-05-20 09:25:39 +0000
commitdc96db5e4120a760f42ce94ba131bef5e49a4e6d (patch)
treef2068582743d9b8c8652b4a0fd9bc26b69e16a02 /app/xterm
parent9988046d452f1d3569a5cd202f320838738c81d3 (diff)
Make 'reset terminal' also reset the blinking state of the cursor.
Fix from Thomas Dickey.
Diffstat (limited to 'app/xterm')
-rw-r--r--app/xterm/charproc.c3
-rw-r--r--app/xterm/ptyx.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c
index 1739c4053..7de80666c 100644
--- a/app/xterm/charproc.c
+++ b/app/xterm/charproc.c
@@ -8062,6 +8062,7 @@ VTInitialize(Widget wrequest,
init_Bres(screen.cursor_blink_xor);
init_Ires(screen.blink_on);
init_Ires(screen.blink_off);
+ screen->cursor_blink_i = screen->cursor_blink;
#endif
init_Bres(screen.cursor_underline);
/* resources allow for underline or block, not (yet) bar */
@@ -11057,6 +11058,8 @@ ReallyReset(XtermWidget xw, Bool full, Bool saved)
screen->cursor_set = ON;
InitCursorShape(screen, screen);
#if OPT_BLINK_CURS
+ SetCursorBlink(screen, screen->cursor_blink_i);
+ screen->cursor_blink_esc = 0;
TRACE(("cursor_shape:%d blinks:%d\n",
screen->cursor_shape,
screen->cursor_blink));
diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h
index 380f9db63..f8d18a1f3 100644
--- a/app/xterm/ptyx.h
+++ b/app/xterm/ptyx.h
@@ -2276,9 +2276,11 @@ typedef struct {
XtCursorShape cursor_shape;
#if OPT_BLINK_CURS
BlinkOps cursor_blink; /* cursor blink enable */
+ BlinkOps cursor_blink_i; /* save cursor blink enable */
char * cursor_blink_s; /* ...resource cursorBlink */
int cursor_blink_esc; /* cursor blink escape-state */
Boolean cursor_blink_xor; /* how to merge menu/escapes */
+ int cursor_blink_esc_i; /* cursor blink escape-state*/
#endif
#if OPT_BLINK_TEXT
Boolean blink_as_bold; /* text blink disable */