diff mcabber/src/histolog.c @ 727:1c3620668857

Expand tabs when reading history files
author Mikael Berthe <mikael@lilotux.net>
date Sun, 05 Mar 2006 22:29:14 +0100
parents ee03b56b93ee
children 39f67cade02c
line wrap: on
line diff
--- a/mcabber/src/histolog.c	Sun Mar 05 19:09:17 2006 +0100
+++ b/mcabber/src/histolog.c	Sun Mar 05 22:29:14 2006 +0100
@@ -33,6 +33,7 @@
 #include "utils.h"
 #include "logprint.h"
 #include "settings.h"
+#include "utils.h"
 
 static guint UseFileLogging;
 static guint FileLoadLogs;
@@ -123,6 +124,7 @@
   char *filename;
   guchar type, info;
   char *data, *tail;
+  char *xtext;
   time_t timestamp;
   guint prefix_flags;
   guint len;
@@ -217,8 +219,10 @@
         prefix_flags = HBB_PREFIX_OUT;
       else
         prefix_flags = HBB_PREFIX_IN;
-      hbuf_add_line(p_buddyhbuf, &data[26], timestamp,
-                    prefix_flags, width);
+      xtext = ut_expand_tabs(&data[26]); // Expand tabs
+      hbuf_add_line(p_buddyhbuf, xtext, timestamp, prefix_flags, width);
+      if (xtext != &data[26])
+        g_free(xtext);
       err = 0;
     }
   }