Remove unused code

This commit is contained in:
Kovid Goyal 2020-02-26 07:31:43 +05:30
parent 3a64b835fb
commit e84163e838
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 5 deletions

View File

@ -241,7 +241,6 @@ screen_resize(Screen *self, unsigned int lines, unsigned int columns) {
self->is_dirty = true; self->is_dirty = true;
self->selection = EMPTY_SELECTION; self->selection = EMPTY_SELECTION;
self->url_range = EMPTY_SELECTION; self->url_range = EMPTY_SELECTION;
self->selection_updated_once = false;
/* printf("old_cursor: (%u, %u) new_cursor: (%u, %u) beyond_content: %d\n", self->cursor->x, self->cursor->y, cursor_x, cursor_y, cursor_is_beyond_content); */ /* printf("old_cursor: (%u, %u) new_cursor: (%u, %u) beyond_content: %d\n", self->cursor->x, self->cursor->y, cursor_x, cursor_y, cursor_is_beyond_content); */
self->cursor->x = MIN(cursor_x, self->columns - 1); self->cursor->x = MIN(cursor_x, self->columns - 1);
self->cursor->y = MIN(cursor_y, self->lines - 1); self->cursor->y = MIN(cursor_y, self->lines - 1);
@ -1716,8 +1715,6 @@ screen_has_selection(Screen *self) {
void void
screen_apply_selection(Screen *self, void *address, size_t size) { screen_apply_selection(Screen *self, void *address, size_t size) {
memset(address, 0, size); memset(address, 0, size);
self->last_selection_scrolled_by = self->scrolled_by;
self->selection_updated_once = true;
apply_selection(self, address, &self->selection, &self->last_rendered.selection, 1); apply_selection(self, address, &self->selection, &self->last_rendered.selection, 1);
apply_selection(self, address, &self->url_range, &self->last_rendered.url, 2); apply_selection(self, address, &self->url_range, &self->last_rendered.url, 2);
} }

View File

@ -75,7 +75,7 @@ typedef struct {
typedef struct { typedef struct {
PyObject_HEAD PyObject_HEAD
unsigned int columns, lines, margin_top, margin_bottom, charset, scrolled_by, last_selection_scrolled_by; unsigned int columns, lines, margin_top, margin_bottom, charset, scrolled_by;
double pending_scroll_pixels; double pending_scroll_pixels;
CellPixelSize cell_size; CellPixelSize cell_size;
OverlayLine overlay_line; OverlayLine overlay_line;
@ -87,7 +87,7 @@ typedef struct {
IterationData selection, url; IterationData selection, url;
unsigned int cursor_x, cursor_y; unsigned int cursor_x, cursor_y;
} last_rendered; } last_rendered;
bool use_latin1, selection_updated_once, is_dirty, scroll_changed, reload_all_gpu_data; bool use_latin1, is_dirty, scroll_changed, reload_all_gpu_data;
Cursor *cursor; Cursor *cursor;
SavepointBuffer main_savepoints, alt_savepoints; SavepointBuffer main_savepoints, alt_savepoints;
SavemodesBuffer modes_savepoints; SavemodesBuffer modes_savepoints;