commit 01d8b0e15dfcb037b3e3ddabce99068a955240a2
parent 16f17f3f1bdea8125c55548d7096b133863207f2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 15 Mar 2020 14:04:57 +0100
help: increase the minimum help-text width from 32 to 40 columns
Getting long words like "Rechtschreibprüfung" broken somewhere in
the middle doesn't look nice.
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/help.c b/src/help.c
@@ -44,7 +44,7 @@ void wrap_help_text_into_buffer(void)
{
size_t sum = 0;
/* Avoid overtight and overwide paragraphs in the introductory text. */
- size_t wrapping_point = (COLS < 32) ? 32 : (COLS > 74) ? 74 : COLS;
+ size_t wrapping_point = (COLS < 40) ? 40 : (COLS > 74) ? 74 : COLS;
const char *ptr = start_of_body;
make_new_buffer();
@@ -55,10 +55,10 @@ void wrap_help_text_into_buffer(void)
char *oneline;
if (ptr == end_of_intro)
- wrapping_point = (COLS < 32) ? 32 : COLS;
+ wrapping_point = (COLS < 40) ? 40 : COLS;
if (ptr > end_of_intro && *(ptr - 1) != '\n') {
- length = break_line(ptr, (COLS < 32) ? 14 : COLS - 18, TRUE);
+ length = break_line(ptr, (COLS < 40) ? 22 : COLS - 18, TRUE);
oneline = nmalloc(length + 5);
snprintf(oneline, length + 5, "\t\t %s", ptr);
} else {
diff --git a/src/text.c b/src/text.c
@@ -1371,7 +1371,7 @@ ssize_t break_line(const char *textstart, ssize_t goal, bool snap_at_nl)
/* Find the last blank that does not overshoot the target column.
* When treating a help text, do not break in the keystrokes area. */
while (*pointer != '\0' && ((ssize_t)column <= goal)) {
- if (is_blank_char(pointer) && (!inhelp || column > 17 || goal < 32))
+ if (is_blank_char(pointer) && (!inhelp || column > 17 || goal < 40))
lastblank = pointer;
#ifdef ENABLE_HELP
else if (snap_at_nl && *pointer == '\n') {