summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 31e10ce..363db16 100644
--- a/main.c
+++ b/main.c
@@ -143,7 +143,7 @@ main(int argc, char **argv)
} else {
inpi = txt_delete(&input, inpi, 1);
}
- goto draw;
+ goto chg;
case UIK_RETURN: {
Str o = opt.v[seli];
printf("%.*s\n", (int)o.n, o.s);
@@ -191,10 +191,11 @@ main(int argc, char **argv)
/* ^W */
if (ev.key.strn == 1 && ev.key.str[0] == 0x17) {
inpi = delete_word(&input, inpi);
- goto draw;
+ goto chg;
}
inpi = txt_insert(&input, inpi,
(Str) { ev.key.str, ev.key.strn });
+ chg:
seli = 0;
goto draw;
}