From 9c458b68ee4c3532ed591333c7500f8f3323ca5e Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Tue, 11 Oct 2022 18:37:38 +0800 Subject: [PATCH] fix: win shell tab auto input --- tools/shell/src/shellAuto.c | 8 ++++++++ tools/shell/src/shellCommand.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 506897cf5b..8aafd747af 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -1133,6 +1133,10 @@ bool firstMatchCommand(TAOS* con, SShellCmd* cmd) { // print to screen printScreen(con, cmd, match); +#ifdef WINDOWS + printf("\r"); + shellShowOnScreen(cmd); +#endif freeCommand(input); taosMemoryFree(input); return true; @@ -1195,6 +1199,10 @@ bool nextMatchCommand(TAOS* con, SShellCmd* cmd, SWords* firstMatch) { // print to screen printScreen(con, cmd, match); +#ifdef WINDOWS + printf("\r"); + shellShowOnScreen(cmd); +#endif // free if (input->source) { diff --git a/tools/shell/src/shellCommand.c b/tools/shell/src/shellCommand.c index cffa02824e..0b26d685fd 100644 --- a/tools/shell/src/shellCommand.c +++ b/tools/shell/src/shellCommand.c @@ -417,8 +417,9 @@ char taosGetConsoleChar() { static char mbStr[5]; static unsigned long bufLen = 0; static uint16_t bufIndex = 0, mbStrIndex = 0, mbStrLen = 0; + CONSOLE_READCONSOLE_CONTROL inputControl={ sizeof(CONSOLE_READCONSOLE_CONTROL), 0, 1< 0 && buf[0] == 0) bufLen = 0; bufIndex = 0; } -- GitLab