Merge "Improve undo support for text entered with IME"