1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

fix cut off text with theme-indent and /set indent_always off

This commit is contained in:
ailin-nemui 2019-07-28 00:54:08 +02:00
parent 7e767e1444
commit c92ff1701f

View File

@ -281,6 +281,7 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
/* long word, remove the indentation from this line */ /* long word, remove the indentation from this line */
xpos -= sub->indent; xpos -= sub->indent;
sub->indent = 0; sub->indent = 0;
sub->indent_func = NULL;
} }
if (xpos + char_width > view->width) { if (xpos + char_width > view->width) {
@ -434,7 +435,7 @@ 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;
if (indent_func == NULL) if (indent_func == NULL || cache->lines[subline-1].continues)
xpos = cache->lines[subline-1].indent; xpos = cache->lines[subline-1].indent;
color = cache->lines[subline-1].color; color = cache->lines[subline-1].color;
#ifdef TERM_TRUECOLOR #ifdef TERM_TRUECOLOR
@ -445,7 +446,7 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
indent_func = NULL; indent_func = NULL;
} }
if (xpos == 0 && indent_func == NULL) if (xpos == 0 && (indent_func == NULL || cache->lines[subline-1].continues))
need_clrtoeol = TRUE; need_clrtoeol = TRUE;
else { else {
/* line was indented - need to clear the /* line was indented - need to clear the