.tmux: Recent change caused duplicate characters and weird backspace behaviour

I updated my fork from this upstream and began to experience weird behaviour like this https://stackoverflow.com/q/45931164/7359333.

I have managed to fix it by removing this line https://github.com/gpakosz/.tmux/blob/0ad7f141dc10fe4964b963bc215bb5e12972b0c3/.tmux.conf#L13

My config: MacOS==12.0.1 tmux==3.2a zsh==5.8 using oh-my-zsh and powerlevel10k theme

Possibly related to this https://github.com/gpakosz/.tmux/issues/516 but it wasn’t only changing colours it was also doing the weird stuff described above

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Hello @paddyroddy 👋

Can you try adding set -g default-terminal "screen-256color" in your ~/.tmux.conf.local, kill all tmux server and client processes, then launch tmux again?

Hello @paddyroddy 👋

I finally got my hands on macOS Montery and there’s tmux-256color terminfo entry installed by default. The version of the system ncurses is still 5.7 (as reported by /usr/bin/tic -V).

So, if /usr/bin/infocmp -x tmux-256color finds the tmux-256color terminfo entry, then it means you already tried to install such an entry yourself.

Here’s what worked for me with a fresh macOS Monterey and a fresh clone of Oh my tmux! (assuming tmux is installed via homebrew):

$ brew install ncurses # should be installed already as a dependency of tmux
$ $(brew --prefix ncurses)/bin/infocmp tmux-256color | sed -e 's/pairs#0x10000/pairs#0x1000/g' -e 's/pairs#0x65536/pairs#0x32768/g' > /tmp/tmux-256color.info
$ /usr/bin/tic -x /tmp/tmux-256color.info

Then I restarted tmux and let it pick tmux-256color for default-terminal (that is to say I don’t override default-terminal in my ~/.tmux.conf.local copy) and verified htop works with colors as well as

$ printf '\033[3mHello italics\033[0m\n'

No idea. Works for me with zsh

It’s instant

Well here are things that should be true

  • outside of tmux, the value of TERM should match the running terminal emulator, usually xterm-256color
  • inside tmux, the value of TERM should be screen-256color or even tmux-256color when the OS has the proper data files that make the tmux-256color value available

Not sure you moved over your settings but from what we discussed so far you

  • upgraded to a new laptop that now runs macOS Monterey
  • you pulled the Oh my tmux! repository
    • recently I changed Oh my tmux! to use tmux-256color when available

On my side, I’ve yet to experiment with macOS Monterey to see how things go

Then it seems that you have broken tmux-* terminal definitions installed on your system.

I suggest you don’t alter .tmux.conf and use your .tmux.conf.local copy instead.

I don’t have macOS Monterey ready so we’ll see if other people have problems with tmux-* terminal definitions