From 559b82ec9b2009736d8b0a6f85013dca56cdbb5a Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Thu, 1 Jan 2026 13:52:41 +0900 Subject: [PATCH] strans.c:Fix preedit window is not displayed or cleared. --- strans.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/strans.c b/strans.c index e085974..19862b5 100644 --- a/strans.c +++ b/strans.c @@ -91,6 +91,8 @@ commit(Str *com) if(mapget(im.l->map, &im.pre, &kana)) sappend(com, &kana); + else + sappend(com, &im.pre); sclear(&im.pre); } @@ -162,7 +164,8 @@ trans(Im *im, Rune c) } flush: - mapget(h, &im->pre, &e.s); + if(!mapget(h, &im->pre, &e.s)) + e.s = im->pre; sclear(&key); sputr(&key, c); if(hmapget(h, &key) == nil){ @@ -252,6 +255,7 @@ keystroke(u32int ks, u32int mod, Str *com) return 1; } dotrans(ks, com); + show(); return 1; }