1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-21 00:25:37 +00:00

mouse: Exit cursor-routing mode when a link is clicked

Before this patch, if you first moved the cursor to link X with
move-cursor-up and similar actions, and then clicked link Y with the
mouse, ELinks would activate link X, i.e. not the one you clicked.
This happened because the NAVIGATE_CURSOR_ROUTING mode was left
enabled and made ELinks ignore the doc_view->vs->current_link
member that ELinks had updated according to the click.
Make ELinks return the session to NAVIGATE_LINKWISE mode, so that
the update takes effect.

Reported by Paul B. Mahol.
(cherry picked from commit 4086418069)
This commit is contained in:
Kalle Olavi Niemitalo 2008-12-24 02:54:14 +02:00 committed by Kalle Olavi Niemitalo
parent cc9c620179
commit d668b3b6aa
2 changed files with 3 additions and 0 deletions

2
NEWS
View File

@ -242,6 +242,8 @@ To be released as 0.11.6.
* major bug 1004: ignore locales when comparing HTML element names and
similar strings, so e.g. ``title'' matches ``TITLE'' even in the
Turkish locale
* minor: clicking a link with the mouse activates that link, rather
than the one selected with move-cursor-* actions
ELinks 0.11.5:
--------------

View File

@ -1167,6 +1167,7 @@ frame_ev_mouse(struct session *ses, struct document_view *doc_view, struct term_
enum frame_event_status status = FRAME_EVENT_REFRESH;
doc_view->vs->current_link = link - doc_view->document->links;
ses->navigate_mode = NAVIGATE_LINKWISE;
if (!link_is_textinput(link)) {