Make clear as also delete images

This commit is contained in:
Kovid Goyal 2017-10-07 16:43:17 +05:30
parent df87c051bd
commit 201ac973e3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 3 deletions

View File

@ -298,10 +298,11 @@ take, and the default value they take when missing. All integers are 32-bit.
When resetting the terminal, all images that are visible on the screen must be
cleared. When switching from the main screen to the alternate screen buffer
(1049 private mode) all images in the alternate screen must be cleared, just as
all text is cleared.
all text is cleared. The clear command (usually `<ESC>[H<ESC>[2J`) should also
clear all images. This is so that the clear command works.
The commands to clear the screen and erase text must have no effect on
graphics. The dedicated delete graphics commands must be used for those.
The other commands to erase text must have no effect on graphics.
The dedicated delete graphics commands must be used for those.
When scrolling the screen (such as when using index cursor movement commands,
or scrolling through the history buffer), images must be scrolled along with

View File

@ -882,6 +882,7 @@ void screen_erase_in_display(Screen *self, unsigned int how, bool private) {
case 1:
a = 0; b = self->cursor->y; break;
case 2:
grman_clear(self->grman);
a = 0; b = self->lines; break;
default:
return;