Skip to content

Commit

Permalink
fix: no remember cursor style in tmux (#163)
Browse files Browse the repository at this point in the history
Without this fix, the cursor will change back to block style after using nvim
and after a status bar update. With this fix, after exiting from nvim the cursor
shape will be fine with the default settings.
  • Loading branch information
AnsonYeung authored Feb 12, 2022
1 parent 13548af commit 462c032
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions zsh-vi-mode.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2993,19 +2993,13 @@ function zvm_viins_undo() {
fi
}

# Change cursor to support for inside/outside tmux
function zvm_set_cursor() {
# Term of vim isn't supported
if [[ -n $VIMRUNTIME ]]; then
return
fi

# Tmux sequence
if [[ -z $TMUX ]]; then
echo -ne "$1"
else
echo -ne "\ePtmux;\e\e$1\e\\"
fi
echo -ne "$1"
}

# Get the escape sequence of cursor style
Expand Down

0 comments on commit 462c032

Please sign in to comment.