summaryrefslogtreecommitdiff
path: root/content/content.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/content.c')
-rw-r--r--content/content.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index 1f7003404..c3f8d7855 100644
--- a/content/content.c
+++ b/content/content.c
@@ -676,6 +676,22 @@ void content_close(hlcache_handle *h)
}
+/**
+ * Find this content's selection context, if it has one.
+ */
+
+struct selection *content_get_selection(hlcache_handle *h)
+{
+ struct content *c = hlcache_handle_get_content(h);
+ assert(c != 0);
+
+ if (c->handler->get_selection != NULL)
+ return c->handler->get_selection(c);
+ else
+ return NULL;
+}
+
+
void content_add_error(struct content *c, const char *token,
unsigned int line)
{