mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 10:51:55 +00:00
Fix partial single line scroll not being reset on key events
This commit is contained in:
parent
66a9963fe9
commit
ebafe8ef5b
2 changed files with 2 additions and 3 deletions
|
|
@ -177,7 +177,7 @@ send_key_to_child(id_type window_id, Screen *screen, const GLFWkeyevent *ev) {
|
|||
debug("discarding repeat key event as DECARM is off\n");
|
||||
return;
|
||||
}
|
||||
if (screen->scrolled_by && action == GLFW_PRESS && !is_no_action_key(key, native_key)) {
|
||||
if ((screen->scrolled_by || screen->pixel_scroll_offset_y != 0) && action == GLFW_PRESS && !is_no_action_key(key, native_key)) {
|
||||
screen_history_scroll(screen, SCROLL_FULL, false); // scroll back to bottom
|
||||
}
|
||||
char encoded_key[KEY_BUFFER_SIZE] = {0};
|
||||
|
|
|
|||
|
|
@ -5066,9 +5066,8 @@ screen_history_scroll(Screen *self, int amt, bool upwards) {
|
|||
amt = MIN((unsigned int)amt, self->scrolled_by);
|
||||
amt *= -1;
|
||||
}
|
||||
if (amt == 0) return false;
|
||||
unsigned int new_scroll = MIN(self->scrolled_by + amt, self->historybuf->count);
|
||||
if (new_scroll != self->scrolled_by) {
|
||||
if (new_scroll != self->scrolled_by || (new_scroll == 0 && self->pixel_scroll_offset_y != 0)) {
|
||||
self->scrolled_by = new_scroll;
|
||||
reset_pixel_scroll(self, 0);
|
||||
dirty_scroll(self);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue