summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-05-25 18:17:15 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-05-25 18:17:15 +0000
commit2bfac6f56290229136501d06294a5b7b75e7a081 (patch)
tree3eb4c3e3fcd69c7054d1d0560929bbb978301816
parent35c20dee5d85c5d6f1dfa80731418027ad6dbc90 (diff)
Fix some error strings, from Kris Katterjohn.
-rw-r--r--usr.bin/tmux/arguments.c6
-rw-r--r--usr.bin/tmux/cmd-resize-pane.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c
index 24a70ee1b5e..da92c77efd3 100644
--- a/usr.bin/tmux/arguments.c
+++ b/usr.bin/tmux/arguments.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arguments.c,v 1.32 2020/05/16 15:40:04 nicm Exp $ */
+/* $OpenBSD: arguments.c,v 1.33 2020/05/25 18:17:14 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -407,11 +407,11 @@ args_string_percentage(const char *value, long long minval, long long maxval,
}
ll = (curval * ll) / 100;
if (ll < minval) {
- *cause = xstrdup("too large");
+ *cause = xstrdup("too small");
return (0);
}
if (ll > maxval) {
- *cause = xstrdup("too small");
+ *cause = xstrdup("too large");
return (0);
}
} else {
diff --git a/usr.bin/tmux/cmd-resize-pane.c b/usr.bin/tmux/cmd-resize-pane.c
index 7aede4da29d..3c75570728d 100644
--- a/usr.bin/tmux/cmd-resize-pane.c
+++ b/usr.bin/tmux/cmd-resize-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-resize-pane.c,v 1.47 2020/05/16 15:01:30 nicm Exp $ */
+/* $OpenBSD: cmd-resize-pane.c,v 1.48 2020/05/25 18:17:14 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -117,7 +117,7 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'y')) {
y = args_percentage(args, 'y', 0, INT_MAX, w->sy, &cause);
if (cause != NULL) {
- cmdq_error(item, "width %s", cause);
+ cmdq_error(item, "height %s", cause);
free(cause);
return (CMD_RETURN_ERROR);
}