inputMethod: Calculate anchor position for preedit text
inputMethod: Calculate anchor position for preedit text
Previously, the anchor position was set to the same value as the cursor position, which prevented clients from receiving preedit highlight information. This commit adds code that calculates the end position of the highlight starting just after the cursor and sets it as the anchor position.
This commit implements the idea described in the following issue: #7742
Preedit highlight is especially important for Japanese IMEs.
Closes: #7742
Edited by Yuki Nishimura