Technically, scroll_until_empty is scroll_until_cursor

This commit is contained in:
Kovid Goyal
2018-11-03 14:23:50 +05:30
parent fc3bd2d15f
commit ce04f102a7
3 changed files with 5 additions and 5 deletions

View File

@@ -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:

View File

@@ -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`.

View File

@@ -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)