summaryrefslogtreecommitdiff
path: root/content/textsearch.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-05-23 22:16:27 +0100
committerVincent Sanders <vince@kyllikki.org>2020-05-23 23:00:08 +0100
commit1161029d2952e5e11062d750a0a681643574428e (patch)
tree0ae814b5a3776b30ee37f5f8cbaa2cdb2b59809e /content/textsearch.c
parent2ea577c47ecca38a0b2d15b15d242c771ce59e29 (diff)
downloadnetsurf-1161029d2952e5e11062d750a0a681643574428e.tar.gz
netsurf-1161029d2952e5e11062d750a0a681643574428e.tar.bz2
remove unecessary content handler specific selection creation
Diffstat (limited to 'content/textsearch.c')
-rw-r--r--content/textsearch.c8
1 files changed, 3 insertions, 5 deletions
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.