From ce04f102a7048136003edc3066b30161f7b01136 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 3 Nov 2018 14:23:50 +0530 Subject: [PATCH] Technically, scroll_until_empty is scroll_until_cursor --- kitty/boss.py | 2 +- kitty/config_data.py | 2 +- kitty/screen.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kitty/boss.py b/kitty/boss.py index ac7ea6ab8..50265d446 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -374,7 +374,7 @@ class Boss: how = 3 if action == 'scrollback' else 2 for w in windows: if action == 'scroll': - w.screen.scroll_until_empty() + w.screen.scroll_until_cursor() continue w.screen.cursor.x = w.screen.cursor.y = 0 if reset: diff --git a/kitty/config_data.py b/kitty/config_data.py index 87c580038..3234abf63 100644 --- a/kitty/config_data.py +++ b/kitty/config_data.py @@ -998,7 +998,7 @@ You can create shortcuts to clear/reset the terminal. For example:: map kitty_mod+f10 clear_terminal clear active # Clear the terminal scrollback by erasing it map kitty_mod+f11 clear_terminal scrollback active - # Clear the terminal screen by scrolling its contents into the scrollback + # Scroll the contents of the screen into the scrollback map kitty_mod+f12 clear_terminal scroll active If you want to operate on all windows instead of just the current one, use :italic:`all` instead of :italic`active`. diff --git a/kitty/screen.c b/kitty/screen.c index a41092826..d34d0898d 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1129,7 +1129,7 @@ screen_insert_lines(Screen *self, unsigned int count) { } void -screen_scroll_until_empty(Screen *self) { +screen_scroll_until_cursor(Screen *self) { unsigned int num_lines_to_scroll = MIN(self->margin_bottom, self->cursor->y + 1); index_type y = self->cursor->y; self->cursor->y = self->margin_bottom; @@ -1873,7 +1873,7 @@ is_using_alternate_linebuf(Screen *self, PyObject *a UNUSED) { WRAP1E(cursor_back, 1, -1) WRAP1B(erase_in_line, 0) WRAP1B(erase_in_display, 0) -WRAP0(scroll_until_empty) +WRAP0(scroll_until_cursor) #define MODE_GETSET(name, uname) \ static PyObject* name##_get(Screen *self, void UNUSED *closure) { PyObject *ans = self->modes.m##uname ? Py_True : Py_False; Py_INCREF(ans); return ans; } \ @@ -2180,7 +2180,7 @@ static PyMethodDef methods[] = { MND(cursor_back, METH_VARARGS) MND(erase_in_line, METH_VARARGS) MND(erase_in_display, METH_VARARGS) - MND(scroll_until_empty, METH_NOARGS) + MND(scroll_until_cursor, METH_NOARGS) METHOD(current_char_width, METH_NOARGS) MND(insert_lines, METH_VARARGS) MND(delete_lines, METH_VARARGS)