xterm sources: ftp://ftp.invisible-island.net/xterm I agreed that it's more likely to be something else than the version. On my Linux virtual terminal, I get your observed incorrect at-2 unpatched behavior with zsh -df, but with just zsh I get the correct (past 2) behavior even without the patch. zsh version is the 5.7.1 release. I can try your patch later today. You should definitely check something rxvt-like as there are several terminals derived from rxvt besides rxvt-unicode (aterm, eterm, mrxvt). rxvt-unicode is at http://dist.schmorp.de/rxvt-unicode/Attic/