parent
14d703f5cc
commit
6a126fa18e
@ -56,6 +56,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
- When using :opt:`strip_trailing_spaces` do not remove empty lines
|
||||
(:iss:`1802`)
|
||||
|
||||
- Fix a crash when displaying very large number of images (:iss:`1825`)
|
||||
|
||||
|
||||
0.14.2 [2019-06-09]
|
||||
---------------------
|
||||
|
||||
@ -260,7 +260,9 @@ find_or_create_image(GraphicsManager *self, uint32_t id, bool *existing) {
|
||||
}
|
||||
*existing = false;
|
||||
ensure_space_for(self, images, Image, self->image_count + 1, images_capacity, 64, true);
|
||||
return self->images + self->image_count++;
|
||||
Image *ans = self->images + self->image_count++;
|
||||
memset(ans, 0, sizeof(ans[0]));
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
||||
@ -490,7 +492,10 @@ handle_put_command(GraphicsManager *self, const GraphicsCommand *g, Cursor *c, b
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ref == NULL) ref = img->refs + img->refcnt++;
|
||||
if (ref == NULL) {
|
||||
ref = img->refs + img->refcnt++;
|
||||
memset(ref, 0, sizeof(ref[0]));
|
||||
}
|
||||
img->atime = monotonic();
|
||||
ref->src_x = g->x_offset; ref->src_y = g->y_offset; ref->src_width = g->width ? g->width : img->width; ref->src_height = g->height ? g->height : img->height;
|
||||
ref->src_width = MIN(ref->src_width, img->width - (img->width > ref->src_x ? ref->src_x : img->width));
|
||||
@ -563,6 +568,7 @@ grman_update_layers(GraphicsManager *self, unsigned int scrolled_by, float scree
|
||||
if (ref->z_index < 0) self->num_of_negative_refs++; else self->num_of_positive_refs++;
|
||||
ensure_space_for(self, render_data, ImageRenderData, self->count + 1, capacity, 64, true);
|
||||
ImageRenderData *rd = self->render_data + self->count;
|
||||
memset(rd, 0, sizeof(rd[0]));
|
||||
set_vertex_data(rd, ref, &r);
|
||||
self->count++;
|
||||
rd->z_index = ref->z_index; rd->image_id = img->internal_id;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user