提交 9078f615 编写于 作者: wafwerar's avatar wafwerar

fix: shell input Chinese char error

上级 34f576b6
...@@ -101,11 +101,8 @@ void shellInsertChar(SShellCmd *cmd, char *c, int32_t size) { ...@@ -101,11 +101,8 @@ void shellInsertChar(SShellCmd *cmd, char *c, int32_t size) {
/* update the values */ /* update the values */
cmd->commandSize += size; cmd->commandSize += size;
cmd->cursorOffset += size; cmd->cursorOffset += size;
for (int i = 0; i < size; i++) { cmd->screenOffset += taosWcharWidth(wc);
taosMbToWchar(&wc, c + i, size); cmd->endOffset += taosWcharWidth(wc);
cmd->screenOffset += taosWcharWidth(wc);
cmd->endOffset += taosWcharWidth(wc);
}
#ifdef WINDOWS #ifdef WINDOWS
#else #else
shellShowOnScreen(cmd); shellShowOnScreen(cmd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册