mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Use a null to represent a blank rather than a space
This has performance benefits when clearing (can use a single memset). Also allows detecting trailing whitespace on lines correctly.
This commit is contained in:
@@ -58,7 +58,7 @@ rewrap_inner(BufType *src, BufType *dest, const index_type src_limit, HistoryBuf
|
||||
src_line_is_continued = is_src_line_continued(src_y);
|
||||
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
|
||||
// Trim trailing blanks since there is a hard line break at the end of this line
|
||||
while(src_x_limit && (src->line->cells[src_x_limit - 1].ch & CHAR_MASK) == BLANK_CHAR) src_x_limit--;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user