1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

Unhighlight previously selected link when using goto-mark

In goto_mark, copy the current_link of the old view state to the
old_current_link of the new view state so that clear_link will properly
clear the highlight for that link.

This fixes a bug introduced with the removal of link_bg in commit
c91c763d49.
This commit is contained in:
Miciah Dashiel Butler Masters 2007-02-04 23:13:39 +00:00 committed by Miciah Dashiel Butler Masters
parent a565365a8d
commit 93aea42b96

View File

@ -71,6 +71,7 @@ index_from_char(unsigned char mark)
void
goto_mark(unsigned char mark, struct view_state *vs)
{
int old_current_link;
#ifdef CONFIG_ECMASCRIPT
struct ecmascript_interpreter *ecmascript;
int ecmascript_fragile;
@ -88,6 +89,7 @@ goto_mark(unsigned char mark, struct view_state *vs)
if (!marks[i] || !compare_uri(marks[i]->uri, vs->uri, 0))
return;
old_current_link = vs->current_link;
#ifdef CONFIG_ECMASCRIPT
ecmascript = vs->ecmascript;
ecmascript_fragile = vs->ecmascript_fragile;
@ -103,6 +105,7 @@ goto_mark(unsigned char mark, struct view_state *vs)
vs->ecmascript = ecmascript;
vs->ecmascript_fragile = ecmascript_fragile;
#endif
vs->old_current_link = old_current_link;
}
static void