From 0705f0931094706a3b758f33f487cf25a6f03cab Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Fri, 7 Feb 2020 23:56:41 -0500 Subject: Only treat the first tab as the alignment point --- ui.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui.c b/ui.c index 374fa93..e9ca3ef 100644 --- a/ui.c +++ b/ui.c @@ -384,9 +384,14 @@ static void wordWrap(WINDOW *win, const char *str) { struct Style style = Reset; while (*str) { if (*str == '\t') { - waddch(win, ' '); - getyx(win, y, align); - str++; + if (align) { + waddch(win, '\t'); + str++; + } else { + waddch(win, ' '); + getyx(win, y, align); + str++; + } } else if (*str == ' ') { getyx(win, y, x); const char *word = &str[strspn(str, " ")]; -- cgit 1.4.1-2-gfad0