aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-13 01:26:43 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-13 01:26:43 +0200
commitc2057ebf7e2a34eccd615a7d88085e247e5b9e9f (patch)
tree6eafbf1c27d5219948daf4b88318d96694ac131a
parentf55f50ea54042f8acef27389c50849094075fb01 (diff)
downloadsciteco-c2057ebf7e2a34eccd615a7d88085e247e5b9e9f.tar.gz
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.
-rw-r--r--src/cmdline.c4
1 files 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;
}
/*