Wayland: avoid replacing text with empty string (#8103)
Rom Grk
created
Fix an issue where the `ime_key` is sometimes an empty string, and
pressing a keystroke replaces the selected text.
E.g. select some text, press `Escape`: selected text is deleted.