diff options
author | Vincent Sanders <vince@kyllikki.org> | 2020-05-20 22:15:33 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2020-05-20 22:17:16 +0100 |
commit | 2f672279014bb6ef2f7b9f346c58d20c7604bad9 (patch) | |
tree | b80f75f4d291e89fb07fa1ddcb776645c32f44fd /content | |
parent | 9ef852cdabe860ae51ad4731c56f93267fe84975 (diff) | |
download | netsurf-2f672279014bb6ef2f7b9f346c58d20c7604bad9.tar.gz netsurf-2f672279014bb6ef2f7b9f346c58d20c7604bad9.tar.bz2 |
cleanup selection code formatting and documentation
removes forward declarations
cleans up documentation comments in header
removes unecessarily exported functions
Diffstat (limited to 'content')
-rw-r--r-- | content/textsearch.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/content/textsearch.c b/content/textsearch.c index 899739435..ae3c8a2b1 100644 --- a/content/textsearch.c +++ b/content/textsearch.c @@ -149,7 +149,6 @@ static void free_matches(struct textsearch_context *textsearch) for (; cur; cur = nxt) { nxt = cur->next; if (cur->sel) { - selection_clear(cur->sel, true); selection_destroy(cur->sel); } free(cur); @@ -171,7 +170,6 @@ static void search_show_all(bool all, struct textsearch_context *context) if (!all && a != context->current) { add = false; if (a->sel) { - selection_clear(a->sel, true); selection_destroy(a->sel); a->sel = NULL; } @@ -182,8 +180,9 @@ static void search_show_all(bool all, struct textsearch_context *context) res = context->c->handler->create_selection(context->c, &a->sel); if (res == NSERROR_OK) { - selection_set_start(a->sel, a->start_idx); - selection_set_end(a->sel, a->end_idx); + selection_set_position(a->sel, + a->start_idx, + a->end_idx); } } } |