Fix deleting images by row not calculating image bounds correctly

Fixes #5081
This commit is contained in:
Kovid Goyal 2022-05-13 09:51:25 +05:30
parent 600c595fdf
commit cf8ccabad9
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View file

@ -59,6 +59,8 @@ Detailed list of changes
- Fix reloading of config not working when :file:`kitty.conf` does not exist when kitty is launched (:iss:`5071`)
- Fix deleting images by row not calculating image bounds correctly (:iss:`5081`)
0.25.0 [2022-04-11]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -1505,7 +1505,7 @@ x_filter_func(const ImageRef *ref, Image UNUSED *img, const void *data, CellPixe
static bool
y_filter_func(const ImageRef *ref, Image UNUSED *img, const void *data, CellPixelSize cell UNUSED) {
const GraphicsCommand *g = data;
return ref->start_row <= (int32_t)g->y_offset - 1 && ((int32_t)(g->y_offset - 1 < ref->start_row + ref->effective_num_rows));
return ref->start_row <= (int32_t)g->y_offset - 1 && ((int32_t)g->y_offset - 1) < ((int32_t)(ref->start_row + ref->effective_num_rows));
}
static bool