engine: nothing pending is no reading, and reaches into nothing
startsearch let reachback walk the client's text whenever Ctrl+H found im.sel < 0, without asking whether anything was pending, so a Ctrl+H pressed to begin a reading took the syllables already written instead. With the cursor after 입니다 the query became 다, the preedit showed nothing at all, and Space committed 多 over the 다 the user had written; typing the reading the key was pressed for gave 다한, so 입니다漢 came out 입니多恨. A reading is what is pending, and there is none. The seeded reach is untouched: 한 committed with 자 pending still converts 한자 as a word and takes the 한 back. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
4
strans.c
4
strans.c
@@ -793,7 +793,9 @@ startsearch(int lang, Str *com)
|
||||
sclear(&seed);
|
||||
if(lang == LangHANJA && !search.lang && im.sel < 0){
|
||||
impre(&im, &seed);
|
||||
reachback(&seed, &back);
|
||||
/* Nothing pending is no reading, and reaches into nothing. */
|
||||
if(seed.n != 0)
|
||||
reachback(&seed, &back);
|
||||
}else
|
||||
flush(com);
|
||||
reset();
|
||||
|
||||
Reference in New Issue
Block a user