From c2057ebf7e2a34eccd615a7d88085e247e5b9e9f Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 13 Sep 2024 01:26:43 +0200 Subject: fixup abb5d23eba21a2aafda0346c0c5dd845561b2aa2: commandline glitches after errors * teco_cmdline.pc is not correct after an error occurred. Therefore start_pc is initialized with teco_cmdline.effective_len. --- src/cmdline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmdline.c b/src/cmdline.c index 25b93c3..e402124 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -226,7 +226,7 @@ teco_cmdline_keypress(const gchar *data, gsize len, GError **error) */ teco_interface_msg_clear(); - gsize start_pc = teco_cmdline.pc; + gsize start_pc = teco_cmdline.effective_len; for (guint i = 0; i < len; i = g_utf8_next_char(data+i) - data) { gunichar chr = g_utf8_get_char(data+i); @@ -318,7 +318,7 @@ teco_cmdline_keypress(const gchar *data, gsize len, GError **error) * but we obviously can't rub out beyond the return if any * error occurs later on. */ - start_pc = teco_cmdline.pc; + start_pc = 0; } /* -- cgit v1.2.3