summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2010-03-23 13:08:46 +0000
committerFrederic Culot <calcurse@culot.org>2010-03-23 13:08:46 +0000
commit31136eb80c62449b644288e1563ff6fe57d3f9c5 (patch)
treee17f1705a8c1ffd033711955c8902007d8ed1d32 /src
parent993ac3c7330385aab0744e24288f7a0345fe4f27 (diff)
downloadcalcurse-31136eb80c62449b644288e1563ff6fe57d3f9c5.zip
Check added to avoid problems in case side bar width is not found in configuration file.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/wins.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wins.c b/src/wins.c
index cfe1050..d1ddc1b 100755
--- a/src/wins.c
+++ b/src/wins.c
@@ -1,4 +1,4 @@
-/* $calcurse: wins.c,v 1.32 2010/03/21 10:17:04 culot Exp $ */
+/* $calcurse: wins.c,v 1.33 2010/03/23 13:08:46 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -179,7 +179,9 @@ wins_set_sbar_width (unsigned perc)
void
wins_sbar_winc (void)
{
- if (sbarwidth < SBARMAXWIDTHPERC * col / 100)
+ if (sbarwidth < SBARMINWIDTH)
+ sbarwidth = SBARMINWIDTH + 1;
+ else if (sbarwidth < SBARMAXWIDTHPERC * col / 100)
sbarwidth++;
}