diff --git a/kitty/line-buf.c b/kitty/line-buf.c index 5aca5c3bf..fde612e61 100644 --- a/kitty/line-buf.c +++ b/kitty/line-buf.c @@ -199,6 +199,7 @@ copy_line_to(LineBuf *self, PyObject *args) { static inline void clear_line_(Line *l, index_type xnum) { memset(l->cells, 0, xnum * sizeof(Cell)); + clear_chars_in_line(l->cells, xnum, BLANK_CHAR); } void linebuf_clear_line(LineBuf *self, index_type y) { diff --git a/kitty/line.c b/kitty/line.c index 6234045a1..90f256f2d 100644 --- a/kitty/line.c +++ b/kitty/line.c @@ -503,7 +503,7 @@ copy_char(Line* self, PyObject *args) { PyErr_SetString(PyExc_ValueError, "Out of bounds"); return NULL; } - copy_line(self, to); + COPY_CELL(self, src, to, dest); Py_RETURN_NONE; }