[elinks-dev] Sponsor development of the key motion.

Witold Filipczyk witekfl at poczta.onet.pl
Sun Aug 12 12:03:04 MDT 2007


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.


More information about the elinks-dev mailing list