summaryrefslogtreecommitdiff
path: root/content/textsearch.c
diff options
context:
space:
mode:
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.