diff options
author | Charles Edward Pax <charles.pax@gmail.com> | 2017-07-29 13:29:26 -0400 |
---|---|---|
committer | Charles Edward Pax <charles.pax@gmail.com> | 2017-07-29 13:29:26 -0400 |
commit | 9c797713063ccbfca069bc65c284ce6a4a925c15 (patch) | |
tree | a3d9aa5c45a1b64ff84e9193c8f110b6dc94a756 /src/help.c | |
parent | 5da4a69978856b4fe3c5993b97525ddbbf991574 (diff) | |
parent | d76edd90b8635245478ab85cbf2fc14a3eec6e7c (diff) |
Merge remote-tracking branch 'origin/freeze' into doxygen
Diffstat (limited to 'src/help.c')
-rw-r--r-- | src/help.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); |