mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 23:14:55 +02:00
Raise an error on negative scroll amounts
This commit is contained in:
@@ -1336,7 +1336,10 @@ scroll(Screen *self, PyObject *args) {
|
||||
amt = self->historybuf->count;
|
||||
break;
|
||||
default:
|
||||
amt = MAX(0, amt);
|
||||
if (amt < 0) {
|
||||
PyErr_SetString(PyExc_ValueError, "scroll amounts must be positive numbers");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (!upwards) {
|
||||
|
||||
Reference in New Issue
Block a user