strans.c:Fix preedit window is not displayed or cleared.
This commit is contained in:
parent
9568893eaf
commit
559b82ec9b
6
strans.c
6
strans.c
@ -91,6 +91,8 @@ commit(Str *com)
|
|||||||
|
|
||||||
if(mapget(im.l->map, &im.pre, &kana))
|
if(mapget(im.l->map, &im.pre, &kana))
|
||||||
sappend(com, &kana);
|
sappend(com, &kana);
|
||||||
|
else
|
||||||
|
sappend(com, &im.pre);
|
||||||
sclear(&im.pre);
|
sclear(&im.pre);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +164,8 @@ trans(Im *im, Rune c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
flush:
|
flush:
|
||||||
mapget(h, &im->pre, &e.s);
|
if(!mapget(h, &im->pre, &e.s))
|
||||||
|
e.s = im->pre;
|
||||||
sclear(&key);
|
sclear(&key);
|
||||||
sputr(&key, c);
|
sputr(&key, c);
|
||||||
if(hmapget(h, &key) == nil){
|
if(hmapget(h, &key) == nil){
|
||||||
@ -252,6 +255,7 @@ keystroke(u32int ks, u32int mod, Str *com)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
dotrans(ks, com);
|
dotrans(ks, com);
|
||||||
|
show();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user