mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
selection: buffer may be empty if only empty cells where selected
This commit is contained in:
parent
9840291100
commit
b31c18c741
1 changed files with 6 additions and 0 deletions
|
|
@ -108,6 +108,12 @@ extract_selection(const struct terminal *term)
|
|||
start_col = 0;
|
||||
}
|
||||
|
||||
if (idx == 0) {
|
||||
/* Selection of empty cells only */
|
||||
buf[idx] = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
||||
assert(idx > 0);
|
||||
assert(idx < buf_size);
|
||||
if (buf[idx - 1] == '\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue