summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-05-27 14:51:58 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-05-27 14:51:58 +0000
commit34c127babe34f5ac6d1876bdea809049d2b88af8 (patch)
treeed5b2e88f6ac6405b560f9f53e7445bdb1943651 /src
parent64e67302eaa590a0f96b304ac58a9ac645cc2340 (diff)
downloadirssi-34c127babe34f5ac6d1876bdea809049d2b88af8.zip
Long lines sometimes had some colors displayed wrong.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@246 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/gui-windows.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-text/gui-windows.c b/src/fe-text/gui-windows.c
index 47595953..6c949886 100644
--- a/src/fe-text/gui-windows.c
+++ b/src/fe-text/gui-windows.c
@@ -227,14 +227,14 @@ static LINE_CACHE_REC *gui_window_line_cache(GUI_WINDOW_REC *gui, LINE_REC *line
LINE_CACHE_SUB_REC *sub;
GSList *lines;
unsigned char *ptr, *last_space_ptr;
- int xpos, pos, indent_pos, last_space, color;
+ int xpos, pos, indent_pos, last_space, last_color, color;
g_return_val_if_fail(line->text != NULL, NULL);
rec = g_new(LINE_CACHE_REC, 1);
xpos = 0; color = 0; indent_pos = DEFAULT_INDENT_POS;
- last_space = 0; last_space_ptr = NULL;
+ last_space = last_color = 0; last_space_ptr = NULL;
rec->count = 1; lines = NULL;
for (ptr = (unsigned char *) line->text;;) {
@@ -281,6 +281,7 @@ static LINE_CACHE_REC *gui_window_line_cache(GUI_WINDOW_REC *gui, LINE_REC *line
if (last_space > indent_pos && last_space > 10) {
/* go back to last space */
+ color = last_color;
ptr = last_space_ptr;
while (*ptr == ' ') ptr++;
}
@@ -301,6 +302,7 @@ static LINE_CACHE_REC *gui_window_line_cache(GUI_WINDOW_REC *gui, LINE_REC *line
if (*ptr++ == ' ') {
last_space = xpos-1;
last_space_ptr = ptr;
+ last_color = color;
}
}