From: nicm Date: Thu, 24 Mar 2022 12:07:25 +0000 (+0000) Subject: Add unit (milliseconds) to escape-time, show unset colours as "none" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7320143c4aaa502fccfe147be71e643a802749bb;p=openbsd Add unit (milliseconds) to escape-time, show unset colours as "none" rather than "invalid" and don't show the same text twice for user options in customize mode. --- diff --git a/usr.bin/tmux/colour.c b/usr.bin/tmux/colour.c index 62ba1f83bbe..16080ae3f50 100644 --- a/usr.bin/tmux/colour.c +++ b/usr.bin/tmux/colour.c @@ -1,4 +1,4 @@ -/* $OpenBSD: colour.c,v 1.24 2021/11/01 07:48:04 nicm Exp $ */ +/* $OpenBSD: colour.c,v 1.25 2022/03/24 12:07:25 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -128,7 +128,7 @@ colour_tostring(int c) u_char r, g, b; if (c == -1) - return ("invalid"); + return ("none"); if (c & COLOUR_FLAG_RGB) { colour_split_rgb(c, &r, &g, &b); diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c index bc8b56a81b4..e1748711fff 100644 --- a/usr.bin/tmux/options-table.c +++ b/usr.bin/tmux/options-table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options-table.c,v 1.161 2022/03/17 11:35:37 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.162 2022/03/24 12:07:25 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -278,6 +278,7 @@ const struct options_table_entry options_table[] = { .minimum = 0, .maximum = INT_MAX, .default_num = 500, + .unit = "milliseconds", .text = "Time to wait before assuming a key is Escape." }, diff --git a/usr.bin/tmux/window-customize.c b/usr.bin/tmux/window-customize.c index 188f3f0af87..cc5dbd5528f 100644 --- a/usr.bin/tmux/window-customize.c +++ b/usr.bin/tmux/window-customize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-customize.c,v 1.13 2021/11/29 11:01:51 nicm Exp $ */ +/* $OpenBSD: window-customize.c,v 1.14 2022/03/24 12:07:25 nicm Exp $ */ /* * Copyright (c) 2020 Nicholas Marriott @@ -680,9 +680,7 @@ window_customize_draw_option(struct window_customize_modedata *data, } ft = format_create_from_state(NULL, NULL, &fs); - if (oe == NULL) - text = "This is a user option."; - else if (oe->text == NULL) + if (oe == NULL || oe->text == NULL) text = "This option doesn't have a description."; else text = oe->text;