aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-04 12:56:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-04 12:56:52 +0000
commit4c78b0203e89b20394ac0fa3a83973d923805ed6 (patch)
tree6c5fde89de81ec8bacb8e9b571b35fe4265add30 /selection.c
parentselection: cell count now adds one extra column per row, for \n (diff)
selection: rename selection_cell_count -> min_bufsize_for_extraction
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/selection.c b/selection.c
index 709334d4..0df05647 100644
--- a/selection.c
+++ b/selection.c
@@ -136,7 +136,7 @@ foreach_selected(
}
static size_t
-selection_cell_count(const struct terminal *term)
+min_bufsize_for_extraction(const struct terminal *term)
{
const struct coord *start = &term->selection.start;
const struct coord *end = &term->selection.end;
@@ -242,7 +242,7 @@ extract_one(struct terminal *term, struct row *row, struct cell *cell,
static char *
extract_selection(const struct terminal *term)
{
- const size_t max_cells = selection_cell_count(term);
+ const size_t max_cells = min_bufsize_for_extraction(term);
const size_t buf_size = max_cells + 1;
struct extract ctx = {