Most language engines wish to draw underline in the typed whole preedit string except for the prediction string.
(Chinese, Japanese, Typing-booster)