From 307ce1cf87e684e4c7d7c370301c59c48596ed89 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Dec 2022 13:50:55 +0530 Subject: [PATCH] Remove not needed wrapper function since now we use a struct to set attrs --- kitty/line-buf.c | 5 ----- kitty/lineops.h | 1 - kitty/screen.c | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/kitty/line-buf.c b/kitty/line-buf.c index 6a5fd8a4f..5149fc8b0 100644 --- a/kitty/line-buf.c +++ b/kitty/line-buf.c @@ -52,11 +52,6 @@ linebuf_mark_line_clean(LineBuf *self, index_type y) { self->line_attrs[y].has_dirty_text = false; } -void -linebuf_mark_line_as_not_continued(LineBuf *self, index_type y) { - self->line_attrs[y].continued = false; -} - void linebuf_clear_attrs_and_dirty(LineBuf *self, index_type y) { self->line_attrs[y].val = 0; diff --git a/kitty/lineops.h b/kitty/lineops.h index 5f2a31a9f..b7eaaec4f 100644 --- a/kitty/lineops.h +++ b/kitty/lineops.h @@ -112,7 +112,6 @@ void linebuf_rewrap(LineBuf *self, LineBuf *other, index_type *, index_type *, H void linebuf_mark_line_dirty(LineBuf *self, index_type y); void linebuf_clear_attrs_and_dirty(LineBuf *self, index_type y); void linebuf_mark_line_clean(LineBuf *self, index_type y); -void linebuf_mark_line_as_not_continued(LineBuf *self, index_type y); unsigned int linebuf_char_width_at(LineBuf *self, index_type x, index_type y); void linebuf_refresh_sprite_positions(LineBuf *self); void historybuf_add_line(HistoryBuf *self, const Line *line, ANSIBuf*); diff --git a/kitty/screen.c b/kitty/screen.c index 7291afeda..6ba03ab93 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -317,7 +317,7 @@ found: // so when resizing, simply blank all lines after the current // prompt and trust the shell to redraw them. for (; y < (int)self->main_linebuf->ynum; y++) { - linebuf_mark_line_as_not_continued(self->main_linebuf, y); + self->main_linebuf->line_attrs[y].continued = false; linebuf_clear_line(self->main_linebuf, y, false); linebuf_init_line(self->main_linebuf, y); if (y <= (int)self->cursor->y) { @@ -1368,7 +1368,7 @@ screen_linefeed(Screen *self) { bool in_margins = cursor_within_margins(self); screen_index(self); if (self->modes.mLNM) screen_carriage_return(self); - if (self->cursor->y < self->lines) linebuf_mark_line_as_not_continued(self->linebuf, self->cursor->y); + if (self->cursor->y < self->lines) self->linebuf->line_attrs[self->cursor->y].continued = false; screen_ensure_bounds(self, false, in_margins); }