Print running command

This commit is contained in:
Night Kaly 2024-11-15 10:32:30 +00:00
parent 2ec48d0ed4
commit 8541312ec0
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM

5
vip.c
View file

@ -1083,6 +1083,10 @@ int main(int argc, char **argv)
case '8': case '9': case '8': case '9':
action = COUNTING; action = COUNTING;
cmd[cmd_len++] = c; cmd[cmd_len++] = c;
cmd[cmd_len] = '\0';
/* cmd occupy 10 char and add a trailing space*/
int lpadding = cols - 11;
wpprintw("%*s%-10s ", lpadding, "", cmd);
break; break;
case HOME_KEY: case HOME_KEY:
@ -1229,7 +1233,6 @@ int main(int argc, char **argv)
memset(&cmd, 0, MAX_COMMAND_SIZE); memset(&cmd, 0, MAX_COMMAND_SIZE);
} else { } else {
move_xy(ARROW_DOWN); move_xy(ARROW_DOWN);
wpprintw("%d", DELETE);
} }
break; break;
} }