mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Reset scroll when toggling screen buffers
This commit is contained in:
@@ -331,6 +331,8 @@ void screen_toggle_screen_buffer(Screen *self) {
|
||||
self->linebuf = self->main_linebuf;
|
||||
self->tabstops = self->main_tabstops;
|
||||
}
|
||||
PyObject_CallMethod(self->callbacks, "buf_toggled", "O", self->linebuf == self->main_linebuf ? Py_True : Py_False);
|
||||
if (PyErr_Occurred()) { PyErr_Print(); PyErr_Clear(); }
|
||||
screen_restore_cursor(self);
|
||||
tracker_update_screen(self->change_tracker);
|
||||
}
|
||||
|
||||
@@ -227,6 +227,9 @@ class Window:
|
||||
k = key_map[GLFW_KEY_UP if upwards else GLFW_KEY_DOWN]
|
||||
self.write_to_child(k * abs(s))
|
||||
|
||||
def buf_toggled(self, is_main_linebuf):
|
||||
self.char_grid.scroll('full', False)
|
||||
|
||||
# actions {{{
|
||||
|
||||
def paste(self, text):
|
||||
|
||||
Reference in New Issue
Block a user