1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

[marks] Reset uri->fragmentlen. Refs #352

I don't know if I don't break something this way.
Mark and goto_mark with and without anchors seem to work.
This commit is contained in:
Witold Filipczyk 2025-01-02 16:16:09 +01:00
parent edca1d9b9b
commit 0faa6b1f7a

View File

@ -83,15 +83,17 @@ goto_mark(unsigned char mark, struct view_state *vs)
struct document_view *doc_view;
int i;
if (!is_valid_mark_char(mark))
if (!is_valid_mark_char(mark)) {
return;
}
i = index_from_char(mark);
assert(is_valid_mark_index(i));
/* TODO: Support for cross-document marks. --pasky */
if (!marks[i] || !compare_uri(marks[i]->uri, vs->uri, 0))
if (!marks[i] || !compare_uri(marks[i]->uri, vs->uri, 0)) {
return;
}
old_current_link = vs->current_link;
#ifdef CONFIG_ECMASCRIPT
@ -141,6 +143,7 @@ set_mark(unsigned char mark, struct view_state *mark_vs)
if (!vs) return;
copy_vs(vs, mark_vs);
vs->uri->fragmentlen = 0;
marks[i] = vs;
}