From 2f672279014bb6ef2f7b9f346c58d20c7604bad9 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 20 May 2020 22:15:33 +0100 Subject: cleanup selection code formatting and documentation removes forward declarations cleans up documentation comments in header removes unecessarily exported functions --- content/textsearch.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'content') 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); } } } -- cgit v1.2.3