Compare commits

..

5 Commits

Author SHA1 Message Date
b4fdc6e813 optimize rendering 2026-02-09 09:24:50 +09:00
b22bc95ad5 add bench 2026-02-09 09:24:50 +09:00
d16b17b4c8 fix kouho selection. 2026-02-09 09:24:50 +09:00
d5d3c23f3e vietnamese telex input 2026-02-09 09:24:50 +09:00
032c60e193 add lang dispatch, korean hangul input 2026-02-09 09:24:45 +09:00

6
ko.c
View File

@ -206,14 +206,12 @@ transko(Im *im, Rune c)
sputr(&e.s, c); sputr(&e.s, c);
return e; return e;
} }
e.eat = 1; e.eat = 1;
last = slastr(&im->pre); last = slastr(&im->pre);
if(last == 0){ if(last == 0){
sputr(&e.next, jm); sputr(&e.next, jm);
return e; return e;
} }
if(!issyl(last)){ if(!issyl(last)){
ci = Choidx(last); ci = Choidx(last);
ji = Jungidx(jm); ji = Jungidx(jm);
@ -234,9 +232,7 @@ transko(Im *im, Rune c)
sputr(&e.next, jm); sputr(&e.next, jm);
return e; return e;
} }
decompose(last, &ci, &ji, &joi); decompose(last, &ci, &ji, &joi);
if(joi == 0){ if(joi == 0){
ni = Jongidx(jm); ni = Jongidx(jm);
if(ni > 0){ if(ni > 0){
@ -255,7 +251,6 @@ transko(Im *im, Rune c)
} }
} }
} }
if(joi > 0){ if(joi > 0){
comb = combine(cjong, nelem(cjong), jong[joi], jm); comb = combine(cjong, nelem(cjong), jong[joi], jm);
if(comb){ if(comb){
@ -286,7 +281,6 @@ transko(Im *im, Rune c)
} }
} }
} }
e.s = im->pre; e.s = im->pre;
sputr(&e.next, jm); sputr(&e.next, jm);
return e; return e;