extract: move ‘strip_trailing_empty’ parameter from extra_finish() to extract_begin()

This commit is contained in:
Daniel Eklöf 2021-03-30 14:40:21 +02:00
parent 0945e71572
commit a6d9f01c0d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 32 additions and 19 deletions

View file

@ -215,7 +215,7 @@ selection_to_text(const struct terminal *term)
if (term->selection.end.row == -1)
return NULL;
struct extraction_context *ctx = extract_begin(term->selection.kind);
struct extraction_context *ctx = extract_begin(term->selection.kind, true);
if (ctx == NULL)
return NULL;
@ -224,7 +224,7 @@ selection_to_text(const struct terminal *term)
&extract_one_const_wrapper, ctx);
char *text;
return extract_finish(ctx, true, &text, NULL) ? text : NULL;
return extract_finish(ctx, &text, NULL) ? text : NULL;
}
void