diff --git a/src/viewer/text/draw.c b/src/viewer/text/draw.c
index 6093315..8719156 100644
--- a/src/viewer/text/draw.c
+++ b/src/viewer/text/draw.c
@@ -220,7 +220,8 @@ draw_doc(struct session *ses, struct document_view
*doc_view, int active)
/* When redrawing the document after things like link menu we
* have to reset the cursor routing state. */
if (ses->navigate_mode == NAVIGATE_CURSOR_ROUTING) {
- set_cursor(term, ses->tab->x, ses->tab->y, 0);
+ if (doc_view->last_x == -1) move_document_start(ses,
doc_view);
+ else set_cursor(term, ses->tab->x, ses->tab->y, 0);
} else {
set_cursor(term, box->x + box->width - 1, box->y +
box->height - 1, 1);
set_window_ptr(ses->tab, box->x, box->y);
With that patch the cursor is placed at the top of the new document,
but when one go back the cursor position is unchanged. It's not so easy.
_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev