Merge pull request #17437 from taosdata/fix/ZhiqiangWang/TD-19607-shell-input-Chinese-char-error

fix: shell input Chinese char error
This commit is contained in:
Shengliang Guan 2022-10-18 18:43:33 +08:00 committed by GitHub
commit de4f430928
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -101,11 +101,8 @@ void shellInsertChar(SShellCmd *cmd, char *c, int32_t size) {
/* update the values */
cmd->commandSize += size;
cmd->cursorOffset += size;
for (int i = 0; i < size; i++) {
taosMbToWchar(&wc, c + i, size);
cmd->screenOffset += taosWcharWidth(wc);
cmd->endOffset += taosWcharWidth(wc);
}
#ifdef WINDOWS
#else
shellShowOnScreen(cmd);