aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2017-01-31 12:52:50 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2017-01-31 12:52:50 +0000
commit9b9a5a292d656f14c927a36bf77af4a4cf1ecb3a (patch)
tree11c1c9ad419ed1dc8bb7d3b67fe01c4befff1c1c /options.c
parentc54a5d9fb3d282354e831b75fe0ad75035cb08b9 (diff)
parentd8da761d54ed0d2b449e412511496e67ce8d33ac (diff)
downloadrtmux-9b9a5a292d656f14c927a36bf77af4a4cf1ecb3a.tar.gz
rtmux-9b9a5a292d656f14c927a36bf77af4a4cf1ecb3a.tar.bz2
rtmux-9b9a5a292d656f14c927a36bf77af4a4cf1ecb3a.zip
Merge branch 'master' of github.com:tmux/tmux
Diffstat (limited to 'options.c')
-rw-r--r--options.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/options.c b/options.c
index 37263b53..4de25937 100644
--- a/options.c
+++ b/options.c
@@ -325,7 +325,7 @@ options_isstring(struct options_entry *o)
}
const char *
-options_tostring(struct options_entry *o, int idx)
+options_tostring(struct options_entry *o, int idx, int numeric)
{
static char s[1024];
const char *tmp;
@@ -355,7 +355,10 @@ options_tostring(struct options_entry *o, int idx)
tmp = attributes_tostring(o->number);
break;
case OPTIONS_TABLE_FLAG:
- tmp = (o->number ? "on" : "off");
+ if (numeric)
+ xsnprintf(s, sizeof s, "%lld", o->number);
+ else
+ tmp = (o->number ? "on" : "off");
break;
case OPTIONS_TABLE_CHOICE:
tmp = o->tableentry->choices[o->number];