From 96ebb6ab8e94a35b5414d315fb03215737ce0375 Mon Sep 17 00:00:00 2001 From: speedie Date: Fri, 7 Apr 2023 23:53:19 +0200 Subject: [PATCH] don't allow columns to be lower than 1, previously this would hide items but we have hideitems now making this useless --- libs/arg.c | 2 +- libs/argv.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/arg.c b/libs/arg.c index fd289db..e0967ba 100644 --- a/libs/arg.c +++ b/libs/arg.c @@ -498,7 +498,7 @@ void setcolumns(const Arg *arg) { columns += arg->i; - if (columns < 0) columns = 0; + if (columns < 1) columns = 1; match(); resizeclient(); diff --git a/libs/argv.c b/libs/argv.c index 5f08e2d..2066c46 100644 --- a/libs/argv.c +++ b/libs/argv.c @@ -386,6 +386,9 @@ readargs(int argc, char *argv[]) fstrstr = cistrstr; } + if (!columns) + columns = 1; + // initial text if (input) insert(input, strlen(input));