summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui.c b/ui.c
index 6449e27..81cf125 100644
--- a/ui.c
+++ b/ui.c
@@ -374,14 +374,16 @@ static short stylePair(struct Style style) {
 	return colorPair(Colors[style.fg], Colors[style.bg]);
 }
 
-static void styleAdd(WINDOW *win, const char *str) {
+static int styleAdd(WINDOW *win, const char *str) {
 	struct Style style = StyleDefault;
 	while (*str) {
 		size_t len = styleParse(&style, &str);
 		wattr_set(win, styleAttr(style), stylePair(style), NULL);
-		waddnstr(win, str, len);
+		if (waddnstr(win, str, len) == ERR)
+			return -1;
 		str += len;
 	}
+	return 0;
 }
 
 static void statusUpdate(void) {
@@ -420,7 +422,7 @@ static void statusUpdate(void) {
 		if (window->scroll) {
 			catf(&cat, "~%d ", window->scroll);
 		}
-		styleAdd(status, buf);
+		if (styleAdd(status, buf) < 0) break;
 	}
 	wclrtoeol(status);
 
d=8fe997d768cd45893b51c91d90ef33cab35b3e9b&follow=1'>Add -X flag to install X stuff on OpenBSDJune McEnroe 2021-02-07Adjust brightness by smaller incrementsJune McEnroe 2021-02-07Fix cwm window cycling, move big by defaultJune McEnroe 2021-02-07Use class names for Foreground, Background, BorderColorJune McEnroe 2021-02-07Add simple battery status and clock to xsessionJune McEnroe 2021-02-07Set cursor theme and sizeJune McEnroe 2021-02-07Use scrot for up -s if no screencaptureJune McEnroe 2021-02-07Enable mouse acceleration in XJune McEnroe 2021-02-07Set colours for Xt and cwmJune McEnroe 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 2021-02-07Fully configure and rebind cwmJune McEnroe 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe 2021-02-06Add xterm output to schemeJune McEnroe