Open oars opened 3 years ago
Hi @oars
Since Tmux is a terminal multiplexer, simply speaking, multiple windows and panes share a single terminal window. So when you switch between pannels, you will meet that the cursor style was not changed, in fact it is the same terminal as we known, unless it is updated by the program in another panel, but luckly the vim or nvim will update the cursor stlyle when you press some keys and auto update by its timer), this plugin will also update the cursor style when you press any key.
Thanks and regards
Hi @oars
Thanks for your patience, this issue has been fixed on #35. Welcome to update your plugin to the latest version.
Thanks and regards
@jeffreytse can still repro this bug. it always makes me want press an i
to enter insert mode when i am already in insert mode
Hi @oars , in fact, this is not a bug, since you are using a terminal multiplexer, the zsh can not get the events of changing terminal, it is only one terminal for the virtual terminal emulators (such as iTerm, Xfce, etc.), now there is no a better solution for this issue. If you open a nvim and a zsh in the same time, you will observe that the zsh's cursor will change to block style after waiting for a while, since the nvim will update the cursor style by timer automatically.
ok. may be tmux has some configuration to generate this event. let me find
@jeffreytse set -g focus-events on may be helped. just want sleep .will try it tomorow
@androidfans I knew this option and this is a configure of tmux
, is it? The key to the problem is that I can get the event callback when the window is focused back.
Hi @androidfans , in fact this issue already was added to my todo list, I will focus on this issue and try to settle it down, any updates I will update here, thanks you for the help.
yes, it's tmux. have found another link may help https://github.com/tmux/tmux/issues/2059
I'm having the same issue.
Before using zsh-vi-mode
, I was using the vi-mode
plugin of oh-my-zsh, which has a VI_MODE_RESET_PROMPT_ON_MODE_CHANGE option solves this issue. I wonder can we do something similar here?
With TMux the cursor style is changed across all terminals.
Ideally I would love to be able to have a block style outside of the shell. So even if I was in insert mode with a pipe, when I go into vim for example I'd like it to go back to a block. Similarly if I go to a different terminal I'd like it to be independent, although I don't know how feasible that is.