modify cursor dislocate

Signed-off-by: zhangjidong <zhangjidong8@huawei.com>
This commit is contained in:
zhangjidong
2025-02-22 09:43:38 +08:00
parent 4b3d163c8b
commit 849dd14c0d
2 changed files with 10 additions and 1 deletions
+2 -1
View File
@@ -246,8 +246,9 @@ if (defined(ohos_lite)) {
"-DMKSH_BUILD_R=593",
]
defines = [ "MKSH_OH_ADAPT" ]
if (mksh_terminal_ext) {
defines = [ "MKSH_TERMINAL_EXT" ]
defines += [ "MKSH_TERMINAL_EXT" ]
}
ldflags = [
+8
View File
@@ -1891,6 +1891,14 @@ x_load_hist(char **hp)
{
char *sp = NULL;
#ifdef MKSH_OH_ADAPT
// update xx_cols before call x_adjust.
change_winsz();
if (x_cols != xx_cols) {
xx_cols = x_cols;
}
#endif
if (hp == histptr + 1) {
sp = holdbufp;
modified = 0;