aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-08-12 19:28:20 +0000
committerTiago Cunha <tcunha@gmx.com>2012-08-12 19:28:20 +0000
commit200b0e5821d83de8c83fcc564fe7eda9253939e0 (patch)
treed1d71f2cc5c061f1f4b3675990a4ebffbe0d55ca /window.c
parent30b801decf261b5e489b1067ee6f04bda40a3d17 (diff)
downloadrtmux-200b0e5821d83de8c83fcc564fe7eda9253939e0.tar.gz
rtmux-200b0e5821d83de8c83fcc564fe7eda9253939e0.tar.bz2
rtmux-200b0e5821d83de8c83fcc564fe7eda9253939e0.zip
Sync OpenBSD patchset 1156:
Instead of numbering choose mode items 0-9a-z and then nothing, number them all and if there are more than 10 use a prompt when 0-9 is pressed. From Thomas Adam.
Diffstat (limited to 'window.c')
-rw-r--r--window.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/window.c b/window.c
index a832f4f3..d3d8c186 100644
--- a/window.c
+++ b/window.c
@@ -1193,3 +1193,13 @@ winlink_clear_flags(struct winlink *wl)
}
}
}
+
+/* Set the grid_cell with fg/bg/attr information when window is in a mode. */
+void
+window_mode_attrs(struct grid_cell *gc, struct options *oo)
+{
+ memcpy(gc, &grid_default_cell, sizeof gc);
+ colour_set_fg(gc, options_get_number(oo, "mode-fg"));
+ colour_set_bg(gc, options_get_number(oo, "mode-bg"));
+ gc->attr |= options_get_number(oo, "mode-attr");
+}