summaryrefslogtreecommitdiffstats
path: root/src/help.c
diff options
context:
space:
mode:
authorCharles Edward Pax <charles.pax@gmail.com>2017-07-29 13:29:26 -0400
committerCharles Edward Pax <charles.pax@gmail.com>2017-07-29 13:29:26 -0400
commit9c797713063ccbfca069bc65c284ce6a4a925c15 (patch)
treea3d9aa5c45a1b64ff84e9193c8f110b6dc94a756 /src/help.c
parent5da4a69978856b4fe3c5993b97525ddbbf991574 (diff)
parentd76edd90b8635245478ab85cbf2fc14a3eec6e7c (diff)
Merge remote-tracking branch 'origin/freeze' into doxygen
Diffstat (limited to 'src/help.c')
-rw-r--r--src/help.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/help.c b/src/help.c
index 0c2985f..20e3b51 100644
--- a/src/help.c
+++ b/src/help.c
@@ -350,8 +350,12 @@ void find_word(char * word, char order) {
int show_lines() {
int lineno, i, k, key = 0, bold = 0 ;
- for (lineno = 0; long_help[lineno + delta] && lineno < LINES - RESROW; lineno++) {
- if (strlen(word_looked)) look_result = str_in_str(long_help[lineno + delta], word_looked);
+ for (lineno = 0; lineno + delta <= max && long_help[lineno + delta] && lineno < LINES - RESROW; lineno++) {
+ if (strlen(word_looked))
+ look_result =
+ str_in_str(
+ long_help[lineno + delta],
+ word_looked);
wmove(main_win, lineno, 0);
wclrtoeol(main_win);