Re: [elinks-dev] Sponsor development of the key motion.
Once again me. Here is the patch which avoids a possible segmentation fault. Avoid segfault. Go to the page with a few lines. Follow a link to a page with more lines. Move cursor down, do not stay on a link. Go back and do move-link-prev-line. This caused a segmentation fault. --- commit 888ba8751674471768d846ff3443aa7bb71ecf82 tree f8a0a629f1aa0455f4532ad259224ab62fbef497 parent 14b37d0362f9963cb2803d08d2c3e6e84574cdbe author Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 20:43:22 +0200 committer Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 20:43:22 +0200 src/viewer/text/view.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viewer/text/view.c b/src/viewer/text/view.c index a0ebefa..8724603 100644 --- a/src/viewer/text/view.c +++ b/src/viewer/text/view.c @@ -189,8 +189,8 @@ move_link_prev_line(struct session *ses, struct document_view *doc_view) get_link_x_bounds(link, y1, &min_x, &max_x); } else { min_x = max_x = x1; - int_upper_bound(&y, document->height - 1); } + int_upper_bound(&y, document->height - 1); for (; y >= 0; y--, min_x = INT_MAX) { link = document->lines1[y]; @@ -238,8 +238,8 @@ move_link_next_line(struct session *ses, struct document_view *doc_view) get_link_x_bounds(link, y1, &min_x, &max_x); } else { min_x = max_x = x1; - int_upper_bound(&y, document->height - 1); } + int_upper_bound(&y, document->height - 1); for (; y < document->height; y++, min_x = -1) { link = document->lines1[y]; ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Sponsor development of the key motion.
Sorry, I didn't realize that we were in the elinks mailing list. Anyway, it seems, the patch now works fine, and it doesn't modify elinks' earlier behaviour either, making the new key motion a really non-intrusive feature. I would like to know if the maintainers can comment on this. Also, it would be nice if you have a paypal account, to which someone can donate if they want to. Thanks a lot for the great software. On Tue, Aug 14, 2007 at 11:58:20PM +0530, Ligesh wrote: > Woohoo. it works properly now. You can post this into the elinks list and I > will ask them to include it. > > Thanks again. > > ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Sponsor development of the key motion.
Woohoo. it works properly now. You can post this into the elinks list and I will ask them to include it. Thanks again. On Tue, Aug 14, 2007 at 11:48:42PM +0530, Ligesh wrote: > This bug has to be fixed properly, otherwise, this is really interfering > with the default elinks behaviour. If we can fix this cursor geometry issue, > I will surely ask them to include it in the mainstream. > > Thanks a lot. > > > On Tue, Aug 14, 2007 at 07:59:14PM +0200, Witold Filipczyk wrote: > > Here is the patch. > > Kalle, Jonas, could apply them (key motion patches) to the mainstream > > ELinks? > > > move-link-down-line, move-link-prev-line, etc.: > > Change mode to NAVIGATE_LINKWISE to preserve the link position when > > going back. > > > > --- > > commit 14b37d0362f9963cb2803d08d2c3e6e84574cdbe > > tree 062545598ae45bf519f7e825b0302542061bbf34 > > parent 2045574edca170a47b1e9f1e05cd210bdae8a49a > > author Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 19:56:02 +0200 > > committer Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 19:56:02 > > +0200 > > > > src/viewer/text/view.c | 25 - > > 1 files changed, 20 insertions(+), 5 deletions(-) > > > > diff --git a/src/viewer/text/view.c b/src/viewer/text/view.c > > index 887f301..a0ebefa 100644 > > --- a/src/viewer/text/view.c > > +++ b/src/viewer/text/view.c > > @@ -201,8 +201,13 @@ move_link_prev_line(struct session *ses, struct > > document_view *doc_view) > > if (!last) last = link; > > else if (link->points[0].x > last->points[0].x) last = > > link; > > } > > - if (last) > > - return move_cursor_rel(ses, doc_view, last->points[0].x > > - x1, last->points[0].y - y1); > > + if (last) { > > + enum frame_event_status status = move_cursor_rel(ses, > > doc_view, > > + last->points[0].x - x1, last->points[0].y - y1); > > + > > + ses->navigate_mode = NAVIGATE_LINKWISE; > > + return status; > > + } > > } > > return FRAME_EVENT_OK; > > } > > @@ -245,8 +250,13 @@ move_link_next_line(struct session *ses, struct > > document_view *doc_view) > > if (!last) last = link; > > else if (link->points[0].x < last->points[0].x) last = > > link; > > } > > - if (last) > > - return move_cursor_rel(ses, doc_view, last->points[0].x > > - x1, last->points[0].y - y1); > > + if (last) { > > + enum frame_event_status status = move_cursor_rel(ses, > > doc_view, > > + last->points[0].x - x1, last->points[0].y - y1); > > + > > + ses->navigate_mode = NAVIGATE_LINKWISE; > > + return status; > > + } > > } > > return FRAME_EVENT_OK; > > } > > @@ -708,7 +718,12 @@ move_link_vertical(struct session *ses, struct > > document_view *doc_view, int dir_ > > if (!link) continue; > > for (; link <= document->lines2[y]; link++) { > > if (link->points[0].y == y) { > > - return move_cursor_rel(ses, doc_view, 0, y - > > y1); > > + enum frame_event_status status = > > move_cursor_rel(ses, > > + doc_view, 0, y - y1); > > + > > + if (vs->current_link != -1) > > + ses->navigate_mode = NAVIGATE_LINKWISE; > > + return status; > > } > > } > > } > > ___ > elinks-dev mailing list > elinks-dev@linuxfromscratch.org > http://linuxfromscratch.org/mailman/listinfo/elinks-dev ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Sponsor development of the key motion.
This bug has to be fixed properly, otherwise, this is really interfering with the default elinks behaviour. If we can fix this cursor geometry issue, I will surely ask them to include it in the mainstream. Thanks a lot. On Tue, Aug 14, 2007 at 07:59:14PM +0200, Witold Filipczyk wrote: > Here is the patch. > Kalle, Jonas, could apply them (key motion patches) to the mainstream ELinks? > move-link-down-line, move-link-prev-line, etc.: > Change mode to NAVIGATE_LINKWISE to preserve the link position when > going back. > > --- > commit 14b37d0362f9963cb2803d08d2c3e6e84574cdbe > tree 062545598ae45bf519f7e825b0302542061bbf34 > parent 2045574edca170a47b1e9f1e05cd210bdae8a49a > author Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 19:56:02 +0200 > committer Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 19:56:02 +0200 > > src/viewer/text/view.c | 25 - > 1 files changed, 20 insertions(+), 5 deletions(-) > > diff --git a/src/viewer/text/view.c b/src/viewer/text/view.c > index 887f301..a0ebefa 100644 > --- a/src/viewer/text/view.c > +++ b/src/viewer/text/view.c > @@ -201,8 +201,13 @@ move_link_prev_line(struct session *ses, struct > document_view *doc_view) > if (!last) last = link; > else if (link->points[0].x > last->points[0].x) last = > link; > } > - if (last) > - return move_cursor_rel(ses, doc_view, last->points[0].x > - x1, last->points[0].y - y1); > + if (last) { > + enum frame_event_status status = move_cursor_rel(ses, > doc_view, > + last->points[0].x - x1, last->points[0].y - y1); > + > + ses->navigate_mode = NAVIGATE_LINKWISE; > + return status; > + } > } > return FRAME_EVENT_OK; > } > @@ -245,8 +250,13 @@ move_link_next_line(struct session *ses, struct > document_view *doc_view) > if (!last) last = link; > else if (link->points[0].x < last->points[0].x) last = > link; > } > - if (last) > - return move_cursor_rel(ses, doc_view, last->points[0].x > - x1, last->points[0].y - y1); > + if (last) { > + enum frame_event_status status = move_cursor_rel(ses, > doc_view, > + last->points[0].x - x1, last->points[0].y - y1); > + > + ses->navigate_mode = NAVIGATE_LINKWISE; > + return status; > + } > } > return FRAME_EVENT_OK; > } > @@ -708,7 +718,12 @@ move_link_vertical(struct session *ses, struct > document_view *doc_view, int dir_ > if (!link) continue; > for (; link <= document->lines2[y]; link++) { > if (link->points[0].y == y) { > - return move_cursor_rel(ses, doc_view, 0, y - > y1); > + enum frame_event_status status = > move_cursor_rel(ses, > + doc_view, 0, y - y1); > + > + if (vs->current_link != -1) > + ses->navigate_mode = NAVIGATE_LINKWISE; > + return status; > } > } > } ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Sponsor development of the key motion.
Here is the patch. Kalle, Jonas, could apply them (key motion patches) to the mainstream ELinks? move-link-down-line, move-link-prev-line, etc.: Change mode to NAVIGATE_LINKWISE to preserve the link position when going back. --- commit 14b37d0362f9963cb2803d08d2c3e6e84574cdbe tree 062545598ae45bf519f7e825b0302542061bbf34 parent 2045574edca170a47b1e9f1e05cd210bdae8a49a author Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 19:56:02 +0200 committer Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 19:56:02 +0200 src/viewer/text/view.c | 25 - 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/viewer/text/view.c b/src/viewer/text/view.c index 887f301..a0ebefa 100644 --- a/src/viewer/text/view.c +++ b/src/viewer/text/view.c @@ -201,8 +201,13 @@ move_link_prev_line(struct session *ses, struct document_view *doc_view) if (!last) last = link; else if (link->points[0].x > last->points[0].x) last = link; } - if (last) - return move_cursor_rel(ses, doc_view, last->points[0].x - x1, last->points[0].y - y1); + if (last) { + enum frame_event_status status = move_cursor_rel(ses, doc_view, + last->points[0].x - x1, last->points[0].y - y1); + + ses->navigate_mode = NAVIGATE_LINKWISE; + return status; + } } return FRAME_EVENT_OK; } @@ -245,8 +250,13 @@ move_link_next_line(struct session *ses, struct document_view *doc_view) if (!last) last = link; else if (link->points[0].x < last->points[0].x) last = link; } - if (last) - return move_cursor_rel(ses, doc_view, last->points[0].x - x1, last->points[0].y - y1); + if (last) { + enum frame_event_status status = move_cursor_rel(ses, doc_view, + last->points[0].x - x1, last->points[0].y - y1); + + ses->navigate_mode = NAVIGATE_LINKWISE; + return status; + } } return FRAME_EVENT_OK; } @@ -708,7 +718,12 @@ move_link_vertical(struct session *ses, struct document_view *doc_view, int dir_ if (!link) continue; for (; link <= document->lines2[y]; link++) { if (link->points[0].y == y) { - return move_cursor_rel(ses, doc_view, 0, y - y1); + enum frame_event_status status = move_cursor_rel(ses, + doc_view, 0, y - y1); + + if (vs->current_link != -1) + ses->navigate_mode = NAVIGATE_LINKWISE; + return status; } } } ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
[elinks-dev] form.onLoad - where are forms loaded?
I'm using elinks as a frontend to an embedded app. I've added a whole bunch of code to viewer/text/form.c to handle our special fields and to calculate the values in the form. All of that is working fine, except that there are several fields that need to be recalculated when the form loads. I can't find the place in the code where the forms are actually loaded and displayed for the first time. Could someone please clue me in on where the form is initially displayed? Thanks, --Yan ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev