From c92ff1701fc413b9f993bfe442894af60d61b5ad Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sun, 28 Jul 2019 00:54:08 +0200 Subject: [PATCH] fix cut off text with theme-indent and /set indent_always off --- src/fe-text/textbuffer-view.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index ec518cbf..a031439d 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -281,6 +281,7 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) /* long word, remove the indentation from this line */ xpos -= sub->indent; sub->indent = 0; + sub->indent_func = NULL; } 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) { /* continuing previous line - indent it */ 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; color = cache->lines[subline-1].color; #ifdef TERM_TRUECOLOR @@ -445,7 +446,7 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line, indent_func = NULL; } - if (xpos == 0 && indent_func == NULL) + if (xpos == 0 && (indent_func == NULL || cache->lines[subline-1].continues)) need_clrtoeol = TRUE; else { /* line was indented - need to clear the