From 1161029d2952e5e11062d750a0a681643574428e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 23 May 2020 22:16:27 +0100 Subject: remove unecessary content handler specific selection creation --- content/textsearch.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'content/textsearch.c') diff --git a/content/textsearch.c b/content/textsearch.c index 4ad23cf20..056da2bf6 100644 --- a/content/textsearch.c +++ b/content/textsearch.c @@ -179,9 +179,8 @@ static void search_show_all(bool all, struct textsearch_context *context) if (add && !a->sel) { - res = context->c->handler->create_selection(context->c, - &a->sel); - if (res == NSERROR_OK) { + a->sel = selection_create(context->c); + if (a->sel != NULL) { selection_set_position(a->sel, a->start_idx, a->end_idx); @@ -426,8 +425,7 @@ content_textsearch_create(struct content *c, content_type type; if ((c->handler->textsearch_find == NULL) || - (c->handler->textsearch_bounds == NULL) || - (c->handler->create_selection == NULL)){ + (c->handler->textsearch_bounds == NULL)) { /* * content has no free text find handler so searching * is unsupported. -- cgit v1.2.3