Allow -p more than 100%, and account for borders when sizing new panes.

From Dane Jensen.
This commit is contained in:
nicm
2026-06-23 09:29:26 +00:00
parent 3ec115115d
commit 9dba08ac8b
7 changed files with 76 additions and 38 deletions

View File

@@ -998,7 +998,7 @@ args_string_percentage(const char *value, long long minval, long long maxval,
copy = xstrdup(value);
copy[valuelen - 1] = '\0';
ll = strtonum(copy, 0, 100, &errstr);
ll = strtonum(copy, 0, 1000, &errstr);
free(copy);
if (errstr != NULL) {
*cause = xstrdup(errstr);
@@ -1066,7 +1066,7 @@ args_string_percentage_and_expand(const char *value, long long minval,
copy[valuelen - 1] = '\0';
f = format_single_from_target(item, copy);
ll = strtonum(f, 0, 100, &errstr);
ll = strtonum(f, 0, 1000, &errstr);
free(f);
free(copy);
if (errstr != NULL) {