diff --git a/docs/changelog.rst b/docs/changelog.rst index 3a2d3fff4..f3283c600 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -44,7 +44,7 @@ To update |kitty|, :doc:`follow the instructions `. - Fix last character of URL not being detected if it is the only character on a new line (:iss:`3088`) -- Don't restrict the DCH control code to only the current scroll region (:iss:`3090`) +- Don't restrict the ICH,DCH,REP control codes to only the current scroll region (:iss:`3090`, :iss:`3096`) 0.19.1 [2020-10-06] diff --git a/kitty/screen.c b/kitty/screen.c index 39643232b..50292ba4d 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1313,7 +1313,7 @@ screen_delete_lines(Screen *self, unsigned int count) { void screen_insert_characters(Screen *self, unsigned int count) { - unsigned int top = self->margin_top, bottom = self->margin_bottom; + const unsigned int top = 0, bottom = self->lines ? self->lines - 1 : 0; if (count == 0) count = 1; if (top <= self->cursor->y && self->cursor->y <= bottom) { unsigned int x = self->cursor->x; @@ -1329,7 +1329,7 @@ screen_insert_characters(Screen *self, unsigned int count) { void screen_repeat_character(Screen *self, unsigned int count) { - unsigned int top = self->margin_top, bottom = self->margin_bottom; + const unsigned int top = 0, bottom = self->lines ? self->lines - 1 : 0; unsigned int x = self->cursor->x; if (count == 0) count = 1; if (x > self->columns) return; @@ -1351,7 +1351,7 @@ screen_repeat_character(Screen *self, unsigned int count) { void screen_delete_characters(Screen *self, unsigned int count) { // Delete characters, later characters are moved left - const unsigned int top = 0, bottom = self->lines - 1; + const unsigned int top = 0, bottom = self->lines ? self->lines - 1 : 0; if (count == 0) count = 1; if (top <= self->cursor->y && self->cursor->y <= bottom) { unsigned int x = self->cursor->x;