If you are using gnome-terminal or xfce4-terminal, you may have hit a bug in vte3. A fix is around since at least 2010, which found its way into some (but not all) distribution packages, and even into upstream (3 years later, but unchanged). ## Bugzilla and other links - Original (?): https://bugzilla.gnome.org/show_bug.cgi?id=542087 - One of its duplicate: https://bugzilla.gnome.org/show_bug.cgi?id=686097 - reported mosh bug related to this problem: https://github.com/mobile-shell/mosh/issues/660 - vte upstream commit: https://git.gnome.org/browse/vte/commit/?id=88e8e89560a62d0981ce2b18974a230d0a07dbdd - used backported patch for vte2: https://github.com/pld-linux/vte0/commit/1e8dce16b239e5d378b02e4d04a60e823df36257
github PR is available here: https://github.com/gentoo/gentoo/pull/2444
Looks like the PR was merged almost 3 years ago, but this bug never closed. Closing it now.