diff options
author | Timo Sirainen <cras@irssi.org> | 2002-05-18 11:51:04 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-05-18 11:51:04 +0000 |
commit | b9eda1adb6966121851c29fa7900e0706ac52d32 (patch) | |
tree | 27e5a99689edc6e3f3e66d781964ae0f34b11cf5 | |
parent | 86ab5ade862acdd4f16a0e5f4c05587849be656b (diff) | |
download | irssi-b9eda1adb6966121851c29fa7900e0706ac52d32.zip |
External indent functions (theme_indent module) weren't working properly.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2815 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-text/textbuffer-view.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index da69734e..a3cbe460 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -343,13 +343,14 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line, if (subline > 0) { /* continuing previous line - indent it */ indent_func = cache->lines[subline-1].indent_func; - xpos = indent_func != NULL ? - indent_func(view, line, ypos) : - cache->lines[subline-1].indent; + if (indent_func == NULL) + xpos = cache->lines[subline-1].indent; color = cache->lines[subline-1].color; + } else { + indent_func = NULL; } - if (xpos == 0) + if (xpos == 0 && indent_func == NULL) need_clrtoeol = TRUE; else { /* line was indented - need to clear the @@ -357,6 +358,9 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line, term_set_color(view->window, ATTR_RESET); term_move(view->window, 0, ypos); term_clrtoeol(view->window); + + if (indent_func != NULL) + xpos = indent_func(view, line, ypos); } if (need_move || xpos > 0) |