diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-16 09:58:30 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-16 09:58:30 +0000 |
| commit | aee22dd4b653921b39b376db4e84a9c7a7f98287 (patch) | |
| tree | 065e0096a956c62752d7c4d575d5335aa1ae22c1 /selection.c | |
| parent | vt: DECALN: render at bottom of terminal, not in view (diff) | |
| parent | vt: execute: \t: use tab stops from tab stop list (diff) | |
Merge branch 'tab-stop'
Diffstat (limited to 'selection.c')
| -rw-r--r-- | selection.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/selection.c b/selection.c index 2a05b853..23eb4450 100644 --- a/selection.c +++ b/selection.c @@ -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') |
