]> granicus.if.org Git - neomutt/commitdiff
Fix line split logic in help (#1019)
authorPietro Cerutti <gahr@gahr.ch>
Tue, 2 Jan 2018 11:59:43 +0000 (11:59 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 2 Jan 2018 11:59:43 +0000 (11:59 +0000)
* Fix line split logic in help

Fixes #1018

help.c

diff --git a/help.c b/help.c
index e1dbe9f746a0a3aacee729e01662d748cee0a0d0..b2a9bd7395ad4088c80985b49416a566d7b5ea50 100644 (file)
--- a/help.c
+++ b/help.c
@@ -218,15 +218,14 @@ static void format_line(FILE *f, int ismacro, const char *t1, const char *t2, co
 {
   int col;
   int col_a, col_b;
-  int split;
+  bool split;
   int n;
 
   fputs(t1, f);
 
-  /* don't try to press string into one line with less than 40 characters.
-     The double parenthesis avoids a gcc warning, sigh ... */
-  split = MuttIndexWindow->cols;
-  if (split < 40)
+  /* don't try to press string into one line with less than 40 characters. */
+  split = (MuttIndexWindow->cols < 40);
+  if (split)
   {
     col_a = col = 0;
     col_b = LONG_STRING;