terminus icon indicating copy to clipboard operation
terminus copied to clipboard

Cursor change not working in iTerm2 with tmux 3.3a

Open dbaldy opened this issue 2 years ago • 5 comments

After quite some tinkering, it turns out that terminus doesn't change the cursor shape in my iTerm2 with Tmux.

I found that the right setup was using the standard terminal option and commenting out the tmux specific update: image

I'm running TERM_PROGRAM_VERSION=3.3a

I don't know why that could be the case, I'm not super knowledgeable about that but if someone has the same issue at least they can find a workaround.

dbaldy avatar Oct 17 '23 05:10 dbaldy

Thanks for the report, @dbaldy.

I tried to repro this with iTerm (Build 3.4.21), with kitty (Version 0.30.1), and inside and outside of tmux (tmux next-3.4, built from source) but it doesn't repro for me.

At first I thought it might be due to the new allow-passthrough setting that defaults to off, and which was added not that long ago to tmux, but I don't see any difference in behavior with this line present or commented out in my ~/.config/tmux/tmux.conf:

set-option -g allow-passthrough all

So, I think for now we just leave this issue open with your workaround for others to find and comment on, and if we get a clearer picture of the exact conditions under which this repros then we can try to find a general fix for it.

wincent avatar Oct 17 '23 09:10 wincent

I am on MacOS with iTerm2 version 3.4.19.

What I get when I type set with the uncommented code: image

With the commented code (working version): image

My tmux.conf looks as follows:

set-window-option -g mode-keys vi
set -g default-terminal "xterm-256color"

dbaldy avatar Oct 17 '23 15:10 dbaldy

After quite some tinkering, it turns out that terminus doesn't change the cursor shape in my iTerm2 with Tmux.

I found that the right setup was using the standard terminal option and commenting out the tmux specific update: image

I'm running TERM_PROGRAM_VERSION=3.3a

I don't know why that could be the case, I'm not super knowledgeable about that but if someone has the same issue at least they can find a workaround.

For anyone else having the same issue: the lines to comment out are in <vim plugin directory>/terminus/plugin/terminus.vim, lines 46 - 54, 62 - 68.

This is occurring for me with:

  • tmux 3.4
  • iTerm2 3.5.0
  • terminus commit 51350e786d4bfcfc476abb015a3f90db3f81231f
  • vim 9.1

EricRobertCampbell avatar May 27 '24 01:05 EricRobertCampbell

Cursor shape for me wasn't changing as well. Following the advice from OP worked.

Im running:

  • terminus (commit 51350e7)
  • foot terminal version: 1.17.2 +pgo +ime +graphemes -assertions
  • tmux 3.4
  • Vim 9.1 (2024 Jan 02, compiled Jun 17 2024 22:29:09)

rifazn avatar Jul 10 '24 10:07 rifazn

Same problem and solution on ubuntu with kitty terminal for me:

  • tmux 3.4
  • vim 9.0
  • kitty 0.30.1

hajoe85 avatar Jul 27 '24 12:07 hajoe85