mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -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.
This commit is contained in:
parent
05c9ae52d5
commit
4086418069
2
NEWS
2
NEWS
@ -15,6 +15,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:
|
||||
--------------
|
||||
|
@ -840,6 +840,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