From 336275220b8ac28aaddbfa0818bda9ca249ba0b9 Mon Sep 17 00:00:00 2001 From: Vatiken Date: Fri, 3 Aug 2012 03:07:06 +0000 Subject: [PATCH] Should fix a small bug with colour starting at the front of a newline in the editor. --- src/improved-edit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/improved-edit.c b/src/improved-edit.c index 43d1677..298d3a4 100644 --- a/src/improved-edit.c +++ b/src/improved-edit.c @@ -530,7 +530,7 @@ int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned } while (*flow && i < high) { - while (*flow && strchr("\n\r\f\t\v ", *flow)) { + while (*flow && strchr("\n\r\f\v ", *flow)) { if (*flow == '\n' && !pass_line) if (i++ >= high) { pass_line = 1; @@ -545,6 +545,8 @@ int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned if (*flow == '\t') { if (*(flow + 1) == '\t') color_chars++; + else if (*(flow + 1) == '[') + color_chars += 7; else color_chars += 2; flow++;