...
This commit is contained in:
@@ -667,22 +667,22 @@ void screen_erase_in_line(Screen *self, unsigned int how, bool private) {
|
|||||||
:param bool private: when ``True`` character attributes are left
|
:param bool private: when ``True`` character attributes are left
|
||||||
unchanged.
|
unchanged.
|
||||||
*/
|
*/
|
||||||
unsigned int s, n;
|
unsigned int s = 0, n = 0;
|
||||||
switch(how) {
|
switch(how) {
|
||||||
case 0:
|
case 0:
|
||||||
s = self->cursor->x;
|
s = self->cursor->x;
|
||||||
n = self->columns - self->cursor->x;
|
n = self->columns - self->cursor->x;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
s = 0; n = self->cursor->x + 1;
|
n = self->cursor->x + 1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
s = 0; n = self->columns;
|
n = self->columns;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
if (n > s) {
|
if (n > 0) {
|
||||||
linebuf_init_line(self->linebuf, self->cursor->y);
|
linebuf_init_line(self->linebuf, self->cursor->y);
|
||||||
if (private) {
|
if (private) {
|
||||||
line_clear_text(self->linebuf->line, s, n, ' ');
|
line_clear_text(self->linebuf->line, s, n, ' ');
|
||||||
|
|||||||
Reference in New Issue
Block a user