Fix incorrect rendering of selection when using rectangular select and scrolling
Fixes #2351
This commit is contained in:
parent
0c58662eb6
commit
917350f058
2 changed files with 6 additions and 3 deletions
|
|
@ -36,6 +36,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||
- Fix rendering of combining characters with fonts that have glyphs for
|
||||
precomposed characters but not decomposed versions (:iss:`2365`)
|
||||
|
||||
- Fix incorrect rendering of selection when using rectangular select and
|
||||
scrolling (:iss:`2351`)
|
||||
|
||||
|
||||
0.16.0 [2020-01-28]
|
||||
--------------------
|
||||
|
|
|
|||
|
|
@ -1557,13 +1557,13 @@ is_selection_empty(Screen *self, unsigned int start_x, unsigned int start_y, uns
|
|||
}
|
||||
|
||||
static inline void
|
||||
selection_coord(Screen *self, unsigned int x, unsigned int y, unsigned int ydelta, SelectionBoundary *ans) {
|
||||
selection_coord(const Screen *self, unsigned int x, unsigned int y, unsigned int ydelta, SelectionBoundary *ans) {
|
||||
if (y + self->scrolled_by < ydelta) {
|
||||
ans->x = 0; ans->y = 0;
|
||||
ans->x = x; ans->y = 0;
|
||||
} else {
|
||||
y = y - ydelta + self->scrolled_by;
|
||||
if (y >= self->lines) {
|
||||
ans->x = self->columns - 1; ans->y = self->lines - 1;
|
||||
ans->x = MIN(x, self->columns - 1); ans->y = self->lines - 1;
|
||||
} else {
|
||||
ans->x = x; ans->y = y;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue