From 61ed5f835cae29ce6405ec34a7e310d5ea90327b Mon Sep 17 00:00:00 2001 From: Morgan Seltzer Date: Mon, 14 Jun 2021 15:51:46 -0400 Subject: Fixed sidebar config sometime not increasing width The sidebar has a numerical mimumum width that is statically defined, and users may set the width of the sidebar in config by incrementing the percentage of the screen between this minimum and a maximum value of 50%. However, internally the mimimum percentage could be set as low as zero, and while that did not decrease the sidebar size below the numerical minimum width, did mean that between 0 and the mimimum width increasing the percentage had no visual effect to indicate change. Now the mimimum percent is not decremented below the mimimum width. Signed-off-by: Morgan Seltzer Signed-off-by: Lukas Fleischer --- src/wins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wins.c') diff --git a/src/wins.c b/src/wins.c index d66ec65..fa4874b 100644 --- a/src/wins.c +++ b/src/wins.c @@ -229,7 +229,7 @@ void wins_sbar_winc(void) void wins_sbar_wdec(void) { - if (sbarwidth_perc > 0) + if (col * sbarwidth_perc / 100 > SBARMINWIDTH) sbarwidth_perc--; } -- cgit v1.2.3-54-g00ecf