1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-01 02:05:33 +00:00

[search] Take into account vertical_overlap in vertical_scrolling to found text. Refs #68

This commit is contained in:
Witold Filipczyk 2020-09-18 20:21:37 +02:00
parent 5ad989ad43
commit 3590191086

View File

@ -1339,7 +1339,7 @@ static enum find_error
move_search_number(struct session *ses, struct document_view *doc_view, int number)
{
struct point *pt;
int x, y;
int x, y, step;
enum find_error ret = FIND_ERROR_NONE;
if (number < 0) {
@ -1363,7 +1363,8 @@ move_search_number(struct session *ses, struct document_view *doc_view, int numb
if (!col_is_in_box(&doc_view->box, x)) {
horizontal_scroll_extended(ses, doc_view, x - doc_view->vs->x, 0);
}
vertical_scroll(ses, doc_view, y - doc_view->vs->y);
step = y - doc_view->vs->y - get_opt_int("document.browse.scrolling.vertical_overlap", ses);
vertical_scroll(ses, doc_view, step);
return ret;
}