mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
86ab5ade86
commit
b9eda1adb6
@ -343,13 +343,14 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
|
|||||||
if (subline > 0) {
|
if (subline > 0) {
|
||||||
/* continuing previous line - indent it */
|
/* continuing previous line - indent it */
|
||||||
indent_func = cache->lines[subline-1].indent_func;
|
indent_func = cache->lines[subline-1].indent_func;
|
||||||
xpos = indent_func != NULL ?
|
if (indent_func == NULL)
|
||||||
indent_func(view, line, ypos) :
|
xpos = cache->lines[subline-1].indent;
|
||||||
cache->lines[subline-1].indent;
|
|
||||||
color = cache->lines[subline-1].color;
|
color = cache->lines[subline-1].color;
|
||||||
|
} else {
|
||||||
|
indent_func = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xpos == 0)
|
if (xpos == 0 && indent_func == NULL)
|
||||||
need_clrtoeol = TRUE;
|
need_clrtoeol = TRUE;
|
||||||
else {
|
else {
|
||||||
/* line was indented - need to clear the
|
/* 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_set_color(view->window, ATTR_RESET);
|
||||||
term_move(view->window, 0, ypos);
|
term_move(view->window, 0, ypos);
|
||||||
term_clrtoeol(view->window);
|
term_clrtoeol(view->window);
|
||||||
|
|
||||||
|
if (indent_func != NULL)
|
||||||
|
xpos = indent_func(view, line, ypos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (need_move || xpos > 0)
|
if (need_move || xpos > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user