1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00

[search] Do not scroll horizontally, when searched text is visible on screen. Refs #68

This commit is contained in:
Witold Filipczyk 2020-09-18 10:23:00 +02:00
parent 881bb98127
commit 5ad989ad43

View File

@ -1360,7 +1360,9 @@ move_search_number(struct session *ses, struct document_view *doc_view, int numb
x = pt[number].x;
y = pt[number].y;
horizontal_scroll_extended(ses, doc_view, x - doc_view->vs->x, 0);
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);
return ret;