Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use escape sequence to change cursor shape inside zsh causes character under the cursor becomes invisible #255

Open
zyf0330 opened this issue Oct 19, 2022 · 0 comments

Comments

@zyf0330
Copy link

zyf0330 commented Oct 19, 2022

I have these codes to change cursor shape inside .zshrc

function zle-line-init zle-keymap-select {
  if [[ ${KEYMAP} == vicmd ]] || [[ $1 = 'block' ]]; then
    echo -ne '\e[1 q'
  elif [[ ${KEYMAP} == main ]] || [[ ${KEYMAP} == viins ]] || [[ ${KEYMAP} = '' ]] || [[ $1 = 'beam' ]]; then
    echo -ne '\e[5 q'
  fi
}
zle -N zle-line-init
zle -N zle-keymap-select
bindkey -M viins 'jk' vi-cmd-mode

In the WebStorm terminal, when I enter viins mode by press i or vicmd mode by press jk, character under the cursor becomes invisible. After cursor moving, it becomes visible again. But if I enter vicmd mode by press esc or ctrl-[, it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant