From 172d01a668fa5c5ca3410bf9dff37f64a366f620 Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Mon, 7 Sep 2020 17:51:09 -0400 Subject: Let wrapped lines use the last column --- buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'buffer.c') diff --git a/buffer.c b/buffer.c index 7478211..3795a24 100644 --- a/buffer.c +++ b/buffer.c @@ -138,10 +138,10 @@ static int flow(struct Lines *hard, int cols, const struct Line *soft) { width += wcwidth(wc); } + if (tab && width < cols) align = width; + if (iswspace(wc) && !tab) wrap = str; if (width <= cols) { - if (tab && width < cols) align = width; - if (iswspace(wc) && !tab) wrap = str; - if (*str == '-') wrap = &str[1]; + if (wc == L'-') wrap = &str[n]; str += n; continue; } -- cgit 1.4.1-2-gfad0