Remove not needed wrapper function since now we use a struct to set attrs

This commit is contained in:
Kovid Goyal 2022-12-23 13:50:55 +05:30
parent 61ceb12e07
commit 307ce1cf87
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 2 additions and 8 deletions

View File

@ -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;

View File

@ -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*);

View File

@ -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);
}