-/* $OpenBSD: input.c,v 1.191 2021/08/13 06:52:51 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.192 2021/08/14 16:26:29 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
log_debug("bad OSC 10: %s", p);
return;
}
- ictx->palette->fg = c;
- if (wp != NULL)
- wp->flags |= PANE_STYLECHANGED;
- screen_write_fullredraw(&ictx->ctx);
+ if (ictx->palette != NULL) {
+ ictx->palette->fg = c;
+ if (wp != NULL)
+ wp->flags |= PANE_STYLECHANGED;
+ screen_write_fullredraw(&ictx->ctx);
+ }
}
/* Handle the OSC 110 sequence for resetting background colour. */
if (*p != '\0')
return;
- ictx->palette->fg = 8;
- if (wp != NULL)
- wp->flags |= PANE_STYLECHANGED;
- screen_write_fullredraw(&ictx->ctx);
+ if (ictx->palette != NULL) {
+ ictx->palette->fg = 8;
+ if (wp != NULL)
+ wp->flags |= PANE_STYLECHANGED;
+ screen_write_fullredraw(&ictx->ctx);
+ }
}
/* Handle the OSC 11 sequence for setting and querying background colour. */
log_debug("bad OSC 11: %s", p);
return;
}
- ictx->palette->bg = c;
- if (wp != NULL)
- wp->flags |= PANE_STYLECHANGED;
- screen_write_fullredraw(&ictx->ctx);
+ if (ictx->palette != NULL) {
+ ictx->palette->bg = c;
+ if (wp != NULL)
+ wp->flags |= PANE_STYLECHANGED;
+ screen_write_fullredraw(&ictx->ctx);
+ }
}
/* Handle the OSC 111 sequence for resetting background colour. */
if (*p != '\0')
return;
- ictx->palette->bg = 8;
- if (wp != NULL)
- wp->flags |= PANE_STYLECHANGED;
- screen_write_fullredraw(&ictx->ctx);
+ if (ictx->palette != NULL) {
+ ictx->palette->bg = 8;
+ if (wp != NULL)
+ wp->flags |= PANE_STYLECHANGED;
+ screen_write_fullredraw(&ictx->ctx);
+ }
}
/* Handle the OSC 52 sequence for setting the clipboard. */