mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05: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:
parent
cc9c620179
commit
d668b3b6aa
2
NEWS
2
NEWS
@ -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:
|
||||
--------------
|
||||
|
@ -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)) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user