未验证 提交 de67ce68 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17300 from taosdata/fix/ZhiqiangWang/TD-13063-win-shell-tab-auto-input

fix: win shell tab auto input
......@@ -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) {
......
......@@ -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<<TAB_KEY, 0 };
while (bufLen == 0) {
ReadConsoleW(console, buf, SHELL_INPUT_MAX_COMMAND_SIZE, &bufLen, NULL);
ReadConsoleW(console, buf, SHELL_INPUT_MAX_COMMAND_SIZE, &bufLen, &inputControl);
if (bufLen > 0 && buf[0] == 0) bufLen = 0;
bufIndex = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册