From ece4d3dc2deb0a05a08ab846d5c82ebb7a07e544 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Thu, 16 Sep 2010 02:00:01 +0000 Subject: [PATCH] fixup_typeahead_match: improve comment Clarify the comment for fixup_typeahead_match and put it closer to the relevant code. --- src/viewer/text/search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c index d85e172e3..224601c94 100644 --- a/src/viewer/text/search.c +++ b/src/viewer/text/search.c @@ -1263,14 +1263,14 @@ search_link_text(struct document *document, int current_link, int i, return -1; } -/* The typeahead input line takes up one of the viewed lines so we - * might have to scroll if the link is under the input line. */ static inline void fixup_typeahead_match(struct session *ses, struct document_view *doc_view) { int current_link = doc_view->vs->current_link; struct link *link = &doc_view->document->links[current_link]; + /* We adjust the box_size to account for the typeahead input line + * (we don't want the input line to cover the current link). */ doc_view->box.height -= 1; check_vs(doc_view); doc_view->box.height += 1;