ref: 845a2a5b5b9772da68585638d6722077c6cd6e58
parent: dcf6a43fc629f4073a0ce3309b987246cf9327ac
author: qwx <[email protected]>
date: Sun Feb 5 11:28:48 EST 2023
pplay: recall last command if repeated
--- a/pplay.c
+++ b/pplay.c
@@ -69,9 +69,12 @@
static char *
prompt(Rune r)
{
+ Rune q;
static char buf[512];
- snprint(buf, sizeof buf, "%C", r);
+ chartorune(&q, buf);
+ if(q != r)
+ snprint(buf, sizeof buf, "%C", r);
if(enter(nil, buf, sizeof(buf)-UTFmax, mc, kc, _screen) < 0)
return nil;
return buf;