From d48f3e5e7b695d5383673332e7c5c469e23aebc8 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@telfort.nl> Date: Sat, 27 Jan 2018 20:59:40 +0100 Subject: [PATCH] help: don't get stuck when there is an unwrappable piece of text When a fragment of help text does not contain any whitespace that we can wrap at, just advance the pointer, because returning zero would mean we stay forever at the same place: nano would hang. --- src/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/help.c b/src/help.c index 948a6651..00f6726b 100644 --- a/src/help.c +++ b/src/help.c @@ -620,7 +620,7 @@ size_t help_line_len(const char *ptr) else if (wrap_location > 0) return wrap_location; else - return 0; + return 1; } #endif /* ENABLE_HELP */ -- GitLab