mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-04 06:46:48 -04:00
config: new option - trim-trailing-spaces-from-selection
When enabled, trailing spaces are trimmed from both regular and block selections.
This commit is contained in:
parent
194cf1ce87
commit
20aab0871f
6 changed files with 15 additions and 5 deletions
|
|
@ -224,10 +224,9 @@ selection_to_text(const struct terminal *term)
|
|||
if (term->selection.end.row == -1)
|
||||
return NULL;
|
||||
|
||||
const enum selection_kind kind = term->selection.kind;
|
||||
const bool trim_trailing_spaces = kind == SELECTION_BLOCK;
|
||||
struct extraction_context *ctx = extract_begin(
|
||||
term->selection.kind, term->conf->trim_trailing_spaces_from_selection);
|
||||
|
||||
struct extraction_context *ctx = extract_begin(kind, trim_trailing_spaces);
|
||||
if (ctx == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue