Skip to content

Commit

Permalink
revise: clear initial directional markers when clearing line (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Jan 19, 2019
1 parent 622c143 commit 1597b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,10 +1227,8 @@ term_erase(bool selective, bool line_only, bool from_begin, bool to_end)
{
line->chars[start.x] = term.erase_char;
line->chars[start.x].attr.attr |= TATTR_CLEAR;
if (!start.x) {
line->chars[-1] = term.erase_char;
line->chars[-1].attr.attr |= TATTR_CLEAR;
}
if (!start.x)
clear_cc(line, -1);
}
if (inclpos(start, cols) && start.y < term.rows)
line = term.lines[start.y];
Expand Down
2 changes: 1 addition & 1 deletion src/termline.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ clear_cc(termline *line, int col)
{
int oldfree, origcol = col;

assert(col >= 0 && col < line->cols);
assert(col >= -1 && col < line->cols);

if (!line->chars[col].cc_next)
return; /* nothing needs doing */
Expand Down

0 comments on commit 1597b87

Please sign in to comment.