Do not control ime caret position.
it may cause a bug scintilla ime not to go well with reconversion or document feed feature.
There are imes which use block indicator for normal input.
Such as Korean ime and Chinese ime.
As a korean I will mention about Korean ime.
Korean Applications ported from linux world in normal has used block indicator for normal input instead of blinking black block Caret.
And the ime caret should be at the start of only block input.
But "if (!onlyTarget)" hinders ime caret from moving forward.
Here is a hidden legacy reconversion code for Korean ime.
Korean ime reconversion can not syncronize with the internal states of IMM32.
https://www.youtube.com/shorts/WNMZWu-95Jw
correct behavior:
https://www.youtube.com/watch?v=RcxhZ6DwxbM
It is reasonable to just remove "if(!onlyTarget) check".
Discussions related:
https://sourceforge.net/p/scintilla/bugs/2390/?limit=25#8af1
https://sourceforge.net/p/scintilla/feature-requests/1304/
https://sourceforge.net/p/scintilla/bugs/2391/?limit=25#cd08/5efb/a409/6f44
If there is no rebuke, I will continue on reverting.
[feature-requests:#1304] adds the
onlyTargetbranch to change behaviour with Japanese when there is a single target in the composition. To see the difference set the Japanese Microsoft IME and Hiragana "あ" mode. Type "katana" and press space. Depending on context, there may be a candidate list or it may be immediately converted to "刀". Since the entire composition is a single target, the caret will be at the end with theonlyTargetbranch but at the start if the patch is applied and theonlyTargetcode removed.With the current code, if there are multiple word possibilities in the composition then only some of the composition is a target so
onlyTargetis false and the caret is placed at the target start. This is inconsistent with the only target case, but is common. For examples try "nokatana" or "watashiwa" to produce multiple target ranges.I do not see this behaviour with current SciTE 5.3.6 with Korean and the example text. Pressing reconvert (
VK_HANJA) before the first character,EscapeHanjais called which selects the next character and shows the candidate box. There is no composition string or target.Related
Feature Requests:
#1304That is not true.
https://youtu.be/Gc_jzPzVoyo
That is just conversion, not reconversion.
but this is not needed more discussion any more,
unless the ime caret positon is respected.
It's what I see:

This is different from what I have learned your instruction since.
It is OK to close this thread.