about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui.c b/ui.c
index 5f912b7..1e7eb26 100644
--- a/ui.c
+++ b/ui.c
@@ -38,6 +38,7 @@
 
 // Annoying stuff from <term.h>:
 #undef lines
+#undef tab
 
 #ifndef A_ITALIC
 #define A_ITALIC A_NORMAL
@@ -577,12 +578,20 @@ static void bufferList(const struct Buffer *buffer) {
 		char buf[sizeof("[00:00:00]")];
 		strftime(buf, sizeof(buf), "[%T]", tm);
 		vid_attr(colorAttr(Colors[Gray]), colorPair(Colors[Gray], -1), NULL);
-		printf("%s\t", buf);
+		printf("%s ", buf);
 
 		size_t len;
+		bool align = false;
 		struct Style style = Reset;
 		while (*line) {
+			if (*line == '\t') {
+				printf("%c", (align ? '\t' : ' '));
+				align = true;
+				line++;
+			}
 			styleParse(&style, &line, &len);
+			size_t tab = strcspn(line, "\t");
+			if (tab < len) len = tab;
 			vid_attr(
 				style.attr | colorAttr(Colors[style.fg]),
 				colorPair(Colors[style.fg], Colors[style.bg]),
of The Ten Thousand Doors of January at the beginning, and more of that N. K. Jemisin series about gods later. I like this interacting with gods and becoming something like one sort of thing. God, it took me a whole month (more?) to read and this is only my third book of the year :( I need some more novellas to read, but the other books I have from the library currently are also thick. 2022-03-22Source ~/.profile.local if it existsJune McEnroe 2022-03-18Publish "Addendum 2021"June McEnroe 2022-03-16Remove wcwidth portJune McEnroe DYLD_FORCE_FLAT_NAMESPACE no longer exists in macOS 12 so this approach doesn't work anymore. Moved to <https://git.causal.agency/jorts/tree/wcwidth> and compiled into <https://git.causal.agency/jorts/tree/ncurses>. 2022-03-16Remove -j4 from ./PlanJune McEnroe Plan learned to set this automatically! 2022-03-15Rewrite Linux install.sh for DebianJune McEnroe 2022-03-15Remove dashJune McEnroe