diff options
author | andmarti1424 <andmarti@gmail.com> | 2017-07-29 09:27:38 -0300 |
---|---|---|
committer | andmarti1424 <andmarti@gmail.com> | 2017-07-29 09:27:38 -0300 |
commit | d76edd90b8635245478ab85cbf2fc14a3eec6e7c (patch) | |
tree | deac8905fb7cfa51135d268f9dc04983e630a516 /src | |
parent | d8e73b14178f6fbe8b575df71140088dca0760b9 (diff) |
Work on issue #188
Diffstat (limited to 'src')
-rw-r--r-- | src/help.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -281,8 +281,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); |