summary refs log tree commit diff
diff options
context:
space:
mode:
-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]),
05dc327cafa13ca4c7b379&follow=1'>Track own usernameJune McEnroe So that we can colour our own messages correctly. 2018-08-03Use a wide pad for the topicJune McEnroe 2018-08-03Ignore NOTICEs not sent to the channelJune McEnroe 2018-08-03Handle KICK and NICKJune McEnroe 2018-08-03Continue on EINTR from pollJune McEnroe Resizing the terminal causes it. 2018-08-03Handle ACTIONsJune McEnroe 2018-08-03Use more octal char literalsJune McEnroe I might be coming around to octal. 2018-08-03Send a WHO in response to NAMES to get usernamesJune McEnroe Other than this slight hack, I think coloring by username rather than nick is a much better idea. 2018-08-03Colorize nicks and channelsJune McEnroe 2018-08-03Add support for mIRC colorsJune McEnroe 2018-08-03Handle bold, italic, underlineJune McEnroe 2018-08-03Add prift function for "prefix shift"June McEnroe Forgive me. 2018-08-03Link with -lcurseswJune McEnroe 2018-08-02Use libtls "compat" ciphersJune McEnroe irc.mozilla.org, using GnuTLS, doesn't support *any* of the "secure" ciphers! 2018-08-02Add UI and handle some kinds of server messagesJune McEnroe Seems like handling input is going to be the worst thing ever. 2018-08-02Add chroot.tar targetJune McEnroe