Reset scroll when toggling screen buffers
This commit is contained in:
parent
5a068f7578
commit
7afbfb8349
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user