aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/main.c b/main.c
index 77ef0a7..e29f192 100644
--- a/main.c
+++ b/main.c
@@ -225,7 +225,7 @@ void enable_term_echo() {
void print_pure(struct input_event * ie) {
if (repeat_counters[ie -> code] != 1) {
- printf("\r%-15s x%-13d", key_names[ie -> code], repeat_counters[ie -> code]);
+ printf("%-15s x%-13d\r", key_names[ie -> code], repeat_counters[ie -> code]);
} else {
printf("%s", key_names[ie -> code]);
}
@@ -299,14 +299,13 @@ int main(int argc, char ** argv) {
}
if (ie.value == KEY_REPEAT) {
+ if (cfg->enable_time) {
+ if (cfg->enable_time) printf("\r\033[K");
+ }
line_lock = ie.code;
repeat_counters[ie.code]++;
fp(&ie);
}
-
- if (ie.value == KEY_RELEASE) {
- repeat_counters[ie.code] = 1;
- }
}
}