This commit is contained in:
Kovid Goyal 2020-02-26 07:28:39 +05:30
parent 08a44ed4dd
commit 3a64b835fb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 6 additions and 6 deletions

View File

@ -1541,7 +1541,7 @@ screen_update_cell_data(Screen *self, void *address, FONTS_DATA_HANDLE fonts_dat
lnum = y - self->scrolled_by;
linebuf_init_line(self->linebuf, lnum);
if (self->linebuf->line->has_dirty_text ||
(cursor_has_moved && (self->cursor->y == lnum || self->last_rendered_cursor_y == lnum))) {
(cursor_has_moved && (self->cursor->y == lnum || self->last_rendered.cursor_y == lnum))) {
render_line(fonts_data, self->linebuf->line, lnum, self->cursor, self->disable_ligatures);
if (self->linebuf->line->has_dirty_text && screen_has_marker(self)) mark_text_in_line(self->marker, self->linebuf->line);

View File

@ -76,7 +76,6 @@ typedef struct {
PyObject_HEAD
unsigned int columns, lines, margin_top, margin_bottom, charset, scrolled_by, last_selection_scrolled_by;
unsigned int last_rendered_cursor_x, last_rendered_cursor_y;
double pending_scroll_pixels;
CellPixelSize cell_size;
OverlayLine overlay_line;
@ -86,6 +85,7 @@ typedef struct {
Selection selection, url_range;
struct {
IterationData selection, url;
unsigned int cursor_x, cursor_y;
} last_rendered;
bool use_latin1, selection_updated_once, is_dirty, scroll_changed, reload_all_gpu_data;
Cursor *cursor;

View File

@ -315,8 +315,8 @@ cell_prepare_to_render(ssize_t vao_idx, ssize_t gvao_idx, Screen *screen, GLfloa
ensure_sprite_map(fonts_data);
bool cursor_pos_changed = screen->cursor->x != screen->last_rendered_cursor_x
|| screen->cursor->y != screen->last_rendered_cursor_y;
bool cursor_pos_changed = screen->cursor->x != screen->last_rendered.cursor_x
|| screen->cursor->y != screen->last_rendered.cursor_y;
bool disable_ligatures = screen->disable_ligatures == DISABLE_LIGATURES_CURSOR;
if (screen->reload_all_gpu_data || screen->scroll_changed || screen->is_dirty || (disable_ligatures && cursor_pos_changed)) {
@ -328,8 +328,8 @@ cell_prepare_to_render(ssize_t vao_idx, ssize_t gvao_idx, Screen *screen, GLfloa
}
if (cursor_pos_changed) {
screen->last_rendered_cursor_x = screen->cursor->x;
screen->last_rendered_cursor_y = screen->cursor->y;
screen->last_rendered.cursor_x = screen->cursor->x;
screen->last_rendered.cursor_y = screen->cursor->y;
}
if (screen->reload_all_gpu_data || screen_is_selection_dirty(screen)) {