Sometimes there were leftover artifacts of the escape sequence visible
in screen(1) and tmux(1), but not always. Anyways, with the splitted
echoing of the escape sequence, at least I wasn't able to reproduce it
any more, so hopefully this fixes the problem for everybody.
function axzsh_is_widechar_terminal {
[[ -t 1 ]] || return 1
axzsh_is_utf_terminal || return 1
- echo -ne "🍀\033[6n\033[1K\r"
+ echo -ne "🍀\033[6n"
read -s -d\[ garbage
read -s -d R pos
+ echo -ne "\033[1K\r"
[[ "${pos#*;}" -eq 2 ]] || return 1
return 0
}