Skip to content

Commit

Permalink
feat: support to custom user default cursor (#131)
Browse files Browse the repository at this point in the history
When you exit from a CLI program, this plugin will restore the
cursor to terminal's default, this feature allows you to custom
user default cursor instead of terminal's default.
  • Loading branch information
jeffreytse committed Oct 19, 2021
1 parent 479edee commit 2f11216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zsh-vi-mode.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3020,13 +3020,13 @@ function zvm_cursor_style() {
# 256 colors the same way xterm does.
xterm*|rxvt*|screen*|tmux*|konsole*|alacritty*|st*)
case $style in
$ZVM_CURSOR_USER_DEFAULT) style='\e[0 q';;
$ZVM_CURSOR_BLOCK) style='\e[2 q';;
$ZVM_CURSOR_UNDERLINE) style='\e[4 q';;
$ZVM_CURSOR_BEAM) style='\e[6 q';;
$ZVM_CURSOR_BLINKING_BLOCK) style='\e[1 q';;
$ZVM_CURSOR_BLINKING_UNDERLINE) style='\e[3 q';;
$ZVM_CURSOR_BLINKING_BEAM) style='\e[5 q';;
$ZVM_CURSOR_USER_DEFAULT) style='\e[0 q';;
esac
;;
*) style='\e[0 q';;
Expand Down

1 comment on commit 2f11216

@jeffreytse
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you enter a CLI program from the prompt, this plugin will restore the cursor to terminal's default, this feature allows you to custom user default cursor instead of terminal's default.

Please sign in to comment.