summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-07 23:56:41 -0500
committerJune McEnroe <june@causal.agency>2020-02-07 23:56:41 -0500
commit0705f0931094706a3b758f33f487cf25a6f03cab (patch)
tree655f516bc1faebc5c57180c9252ca7116ca88765
parentRevert "Only treat the first tab as the alignment point" (diff)
downloadcatgirl-0705f0931094706a3b758f33f487cf25a6f03cab.tar.gz
catgirl-0705f0931094706a3b758f33f487cf25a6f03cab.zip
Only treat the first tab as the alignment point
-rw-r--r--ui.c11
1 files 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, " ")];
low=1'>Add M-a to switch to hot or unread windowJune McEnroe 2019-02-25Refactor uiReadJune McEnroe 2019-02-24Scroll by full pages with PageUp/PageDownJune McEnroe 2019-02-23Clarify /window documentationJune McEnroe 2019-02-23Use first word of params in input commandsJune McEnroe 2019-02-23Add C-n and C-p key bindings to switch windowsJune McEnroe 2019-02-23Change example command to join #ascii.town on freenodeJune McEnroe 2019-02-23Call def_prog_mode after termNoFlowJune McEnroe 2019-02-22Move IRC formatting reset to C-sJune McEnroe 2019-02-22Disable terminal flow controlJune McEnroe 2019-02-22Bind up and down arrows to scrollJune McEnroe 2019-02-22Remove topic TODOJune McEnroe 2019-02-22Add /znc commandJune McEnroe 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe 2019-02-21Replace "view" with "window"June McEnroe 2019-02-21Remove ROT13June McEnroe 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe