mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Cleanup previous PR
This commit is contained in:
parent
08472207e2
commit
58d314be7c
2 changed files with 2 additions and 2 deletions
|
|
@ -292,7 +292,7 @@ copy_line_to(LineBuf *self, PyObject *args) {
|
|||
unsigned int y;
|
||||
Line src, *dest;
|
||||
if (!PyArg_ParseTuple(args, "IO!", &y, &Line_Type, &dest)) return NULL;
|
||||
if (y >= self->ynum) { PyErr_SetString(PyExc_ValueError, "Out of bounds"); return NULL; }
|
||||
if (y >= self->ynum) { PyErr_SetString(PyExc_IndexError, "Out of bounds"); return NULL; }
|
||||
src.xnum = self->xnum; dest->xnum = self->xnum;
|
||||
dest->ynum = y;
|
||||
dest->attrs = self->line_attrs[y];
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ class TestDataTypes(BaseTest):
|
|||
l2 = lb.create_line_copy(2)
|
||||
lb.copy_line_to(1, l2)
|
||||
self.ae(l2, lb2.line(2))
|
||||
with self.assertRaises(ValueError):
|
||||
with self.assertRaises(IndexError):
|
||||
lb.copy_line_to(lb.ynum, l2)
|
||||
lb.clear_line(0)
|
||||
self.ae(lb.line(0), LineBuf(1, lb.xnum).create_line_copy(0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue