1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00

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
This commit is contained in:
Timo Sirainen 2002-05-18 11:51:04 +00:00 committed by cras
parent 86ab5ade86
commit b9eda1adb6

View File

@ -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)