aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/selection.c b/selection.c
index eb21d318..d5add464 100644
--- a/selection.c
+++ b/selection.c
@@ -195,6 +195,14 @@ foreach_selected(
assert(false);
}
+static bool
+extract_one_const_wrapper(struct terminal *term,
+ struct row *row, struct cell *cell,
+ int col, void *data)
+{
+ return extract_one(term, row, cell, col, data);
+}
+
static char *
extract_selection(const struct terminal *term)
{
@@ -204,7 +212,7 @@ extract_selection(const struct terminal *term)
foreach_selected(
(struct terminal *)term, term->selection.start, term->selection.end,
- &extract_one, ctx);
+ &extract_one_const_wrapper, ctx);
char *text;
return extract_finish(ctx, &text, NULL) ? text : NULL;