From c6780ca463f40dc9310331d329cd880468d06da5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 9 Nov 2016 19:11:32 +0530 Subject: [PATCH] ... --- kitty/line-buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/line-buf.c b/kitty/line-buf.c index 7e2233298..fe1ce0789 100644 --- a/kitty/line-buf.c +++ b/kitty/line-buf.c @@ -414,7 +414,7 @@ static bool rewrap_inner(LineBuf *src, LineBuf *dest, const index_type src_limit src_x_limit = src->xnum; if (!src_line_is_continued) { // Trim trailing white-space since there is a hard line break at the end of this line - while(src_x_limit && (src->line->chars[src->line->xnum - 1] & CHAR_MASK) == 32) src_x_limit--; + while(src_x_limit && (src->line->chars[src_x_limit - 1] & CHAR_MASK) == 32) src_x_limit--; } while (src_x < src_x_limit) {