commit d48f3e5e7b695d5383673332e7c5c469e23aebc8
parent b18e76d4d88b9a8df67fb62468f67233e4618a99
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 27 Jan 2018 20:59:40 +0100
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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 */