mirror of
https://github.com/tmux/tmux.git
synced 2026-03-26 13:16:37 +00:00
Use window options for cursor-style to avoid crash when no pane, from
Arden Packeer in GitHub issue 4942.
This commit is contained in:
7
input.c
7
input.c
@@ -1613,7 +1613,7 @@ input_csi_dispatch(struct input_ctx *ictx)
|
|||||||
if (ictx->wp != NULL)
|
if (ictx->wp != NULL)
|
||||||
oo = ictx->wp->options;
|
oo = ictx->wp->options;
|
||||||
else
|
else
|
||||||
oo = global_options;
|
oo = global_w_options;
|
||||||
p = options_get_number(oo, "cursor-style");
|
p = options_get_number(oo, "cursor-style");
|
||||||
|
|
||||||
/* blink for 1,3,5; steady for 0,2,4,6 */
|
/* blink for 1,3,5; steady for 0,2,4,6 */
|
||||||
@@ -2503,7 +2503,7 @@ input_handle_decrqss(struct input_ctx *ictx)
|
|||||||
if (wp != NULL)
|
if (wp != NULL)
|
||||||
oo = wp->options;
|
oo = wp->options;
|
||||||
else
|
else
|
||||||
oo = global_options;
|
oo = global_w_options;
|
||||||
opt_ps = options_get_number(oo, "cursor-style");
|
opt_ps = options_get_number(oo, "cursor-style");
|
||||||
|
|
||||||
/* Sanity clamp: valid Ps are 0..6 per DECSCUSR. */
|
/* Sanity clamp: valid Ps are 0..6 per DECSCUSR. */
|
||||||
@@ -2538,7 +2538,8 @@ input_dcs_dispatch(struct input_ctx *ictx)
|
|||||||
long long allow_passthrough = 0;
|
long long allow_passthrough = 0;
|
||||||
|
|
||||||
if (wp == NULL)
|
if (wp == NULL)
|
||||||
return (0);
|
oo = global_w_options;
|
||||||
|
else
|
||||||
oo = wp->options;
|
oo = wp->options;
|
||||||
|
|
||||||
if (ictx->flags & INPUT_DISCARD) {
|
if (ictx->flags & INPUT_DISCARD) {
|
||||||
|
|||||||
Reference in New Issue
Block a user