Simplify implementation of REP

Also make it align more with the standard by using the actual last drawn
graphics character rather than the character before the cursor
This commit is contained in:
Kovid Goyal
2021-01-03 04:38:02 +05:30
parent 8f58140419
commit b3ed4c3f40
4 changed files with 22 additions and 20 deletions

View File

@@ -128,6 +128,7 @@ typedef struct {
hyperlink_id_type active_hyperlink_id;
HYPERLINK_POOL_HANDLE hyperlink_pool;
ANSIBuf as_ansi_buf;
char_type last_graphic_char;
} Screen;
@@ -143,7 +144,7 @@ void screen_cursor_position(Screen*, unsigned int, unsigned int);
void screen_cursor_back(Screen *self, unsigned int count/*=1*/, int move_direction/*=-1*/);
void screen_erase_in_line(Screen *, unsigned int, bool);
void screen_erase_in_display(Screen *, unsigned int, bool);
void screen_draw(Screen *screen, uint32_t codepoint);
void screen_draw(Screen *screen, uint32_t codepoint, bool);
void screen_ensure_bounds(Screen *self, bool use_margins, bool cursor_was_within_margins);
void screen_toggle_screen_buffer(Screen *self, bool, bool);
void screen_normal_keypad_mode(Screen *self);