Re: Sponsor development of the key motion.

Witold Filipczyk <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <20070812083622.GA6738@pldmachine>
Here is second patch, which fixes moving in frames.
-- 
Witek

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev
02.patch (text/plain, 2.7 KB)
actions: Fixed moving in frames.

---
commit a68c563198afd22cf293b0c754ef1e5b73e8e9cc
tree 52fd6c553ae0c355829131b32059d80784892170
parent 7882384bce49ab8d09e4c6d7a4b7b0eb0c945797
author Witold Filipczyk <[email protected]> Sun, 12 Aug 2007 10:34:00 +0200
committer Witold Filipczyk <nobody@nowhere> Sun, 12 Aug 2007 10:34:00 +0200

 src/viewer/text/view.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/viewer/text/view.c b/src/viewer/text/view.c
index c985c5d..887f301 100644
--- a/src/viewer/text/view.c
+++ b/src/viewer/text/view.c
@@ -169,6 +169,7 @@ move_link_prev_line(struct session *ses, struct document_view *doc_view)
 {
 	struct view_state *vs;
 	struct document *document;
+	struct box *box;
 	struct link *link, *last = NULL;
 	int y1, y, min_x, max_x, x1;
 
@@ -178,10 +179,10 @@ move_link_prev_line(struct session *ses, struct document_view *doc_view)
 	vs = doc_view->vs;
 	document = doc_view->document;
 	if (!document->lines1) return FRAME_EVENT_OK;
+	box = &doc_view->box;
 
-	y = y1 = vs->y + ses->tab->y - ses->status.show_title_bar
-		- (ses->status.show_tabs_bar && ses->status.show_tabs_bar_at_top);
-	x1 = vs->x + ses->tab->x;
+	y = y1 = vs->y + ses->tab->y - box->y;
+	x1 = vs->x + ses->tab->x - box->x;
 
 	link = get_current_link(doc_view);
 	if (link) {
@@ -212,6 +213,7 @@ move_link_next_line(struct session *ses, struct document_view *doc_view)
 {
 	struct view_state *vs;
 	struct document *document;
+	struct box *box;
 	struct link *link, *last = NULL;
 	int y1, y, min_x, max_x, x1;
 
@@ -221,10 +223,10 @@ move_link_next_line(struct session *ses, struct document_view *doc_view)
 	vs = doc_view->vs;
 	document = doc_view->document;
 	if (!document->lines1) return FRAME_EVENT_OK;
+	box = &doc_view->box;
 
-	y = y1 = vs->y + ses->tab->y - ses->status.show_title_bar
-		- (ses->status.show_tabs_bar && ses->status.show_tabs_bar_at_top);
-	x1 = vs->x + ses->tab->x;
+	y = y1 = vs->y + ses->tab->y - box->y;
+	x1 = vs->x + ses->tab->x - box->x;
 
 	link = get_current_link(doc_view);
 	if (link) {
@@ -684,6 +686,7 @@ move_link_vertical(struct session *ses, struct document_view *doc_view, int dir_
 {
 	struct document *document;
 	struct view_state *vs;
+	struct box *box;
 	int y, y1;
 
 	assert(ses && doc_view && doc_view->vs && doc_view->document);
@@ -692,8 +695,8 @@ move_link_vertical(struct session *ses, struct document_view *doc_view, int dir_
 	document = doc_view->document;
 	if (!document->lines1) return FRAME_EVENT_OK;
 
-	y1 = vs->y + ses->tab->y - ses->status.show_status_bar
-		- (ses->status.show_tabs_bar && ses->status.show_tabs_bar_at_top);
+	box = &doc_view->box;
+	y1 = vs->y + ses->tab->y - box->y;
 	y = y1 + dir_y;
 	if (dir_y < 0)
 		int_upper_bound(&y, document->height - 1);
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.