From eae5c65d3ef83be9e7f04a6c1a801d149c2984f1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 12 Nov 2021 17:56:04 +0530 Subject: [PATCH] Also move overlay when getting backspace from child zsh for some reason sends this when you send it a word. Fixes #4219 --- kitty/screen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kitty/screen.c b/kitty/screen.c index d0f91a4ac..0f36e2b69 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1195,10 +1195,13 @@ screen_set_tab_stop(Screen *self) { void screen_cursor_back(Screen *self, unsigned int count/*=1*/, int move_direction/*=-1*/) { + PyObject *overlay_text = NULL; + if (self->overlay_line.is_active) { overlay_text = get_overlay_text(self); deactivate_overlay_line(self); } if (count == 0) count = 1; if (move_direction < 0 && count > self->cursor->x) self->cursor->x = 0; else self->cursor->x += move_direction * count; screen_ensure_bounds(self, false, cursor_within_margins(self)); + if (overlay_text) { screen_draw_overlay_text(self, PyUnicode_AsUTF8(overlay_text)); Py_DECREF(overlay_text); } } void