Re: Sponsor development of the key motion.

Witold Filipczyk <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <20070812180304.GA4588@pldmachine>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.