aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-14 15:06:04 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-14 15:06:04 +0000
commita2af13a1260b70e59a465debc890d40cd7103964 (patch)
treea17998593eede45c0ca10e6946127e3414b1538e /selection.c
parentgrid: reflow: handle multi column character spacers (diff)
selection: no need to try to detect multi-column chars at the end of the line
This is handled by the generic foreach() functions, which now simply skips spacer cells.
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/selection.c b/selection.c
index d5f8721c..f460607a 100644
--- a/selection.c
+++ b/selection.c
@@ -273,22 +273,7 @@ extract_one(struct terminal *term, struct row *row, struct cell *cell,
/* New row - determine if we should insert a newline or not */
if (term->selection.kind == SELECTION_NORMAL) {
- int width = max(1, wcwidth(cell->wc));
-
- if (width > 1) {
- /* Heuristict to handle force-wrapped multi-column
- * characters */
-
- /*
- * TODO: maybe we should print a placeholder value to
- * the empty cells at the end of the line when
- * force-wrapping? Then extract() could simply skip
- * those cells
- */
- ctx->empty_count -= min(width, ctx->empty_count);
- }
-
- else if (ctx->last_row->linebreak ||
+ if (ctx->last_row->linebreak ||
ctx->empty_count > 0 ||
cell->wc == 0)
{