jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
3.13k stars 109 forks source link

The cursor color isn't restored to default after enter into another program like vim #121

Closed jeffreytse closed 3 years ago

jeffreytse commented 3 years ago

General information

Please report the following information as possible as you can:

Basic examination

Problem description

Reproduction steps

  1. Add below config to .zshrc:
   zvm_before_init() {
       local ncur=$(zvm_cursor_style $ZVM_NORMAL_MODE_CURSOR)
       local icur=$(zvm_cursor_style $ZVM_INSERT_MODE_CURSOR)

       ZVM_INSERT_MODE_CURSOR=$icur'\e\e]12;red\a'
       ZVM_NORMAL_MODE_CURSOR=$ncur'\e\e]12;#008800\a'
   }
  1. Open terminal, and enter vim program
  2. Cursor still keeps red color

Expected behavior

Cursor should be recovered to default style including the color.