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

Switching modes don't trigger an auto reset prompt #243

Closed
3 tasks done
jeffreytse opened this issue Sep 20, 2023 · 1 comment
Closed
3 tasks done

Switching modes don't trigger an auto reset prompt #243

jeffreytse opened this issue Sep 20, 2023 · 1 comment
Assignees
Labels
bug Something isn't working verified This issue was already verified

Comments

@jeffreytse
Copy link
Owner

General information

Please report the following information as possible as you can:

  • Terminal program: tmux 3.3a (screen-256color)
  • Operating system: macOS 13.4.1 (22F770820d)
  • ZSH framework: starship 1.15.0
  • ZSH version: zsh 5.9 (x86_64-apple-darwin22.0)
  • ZVM version: zsh-vi-mode 0.10.0 (1f28e18, 2023-07-26 18:28:07 +0800)

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program

Problem description

Switching modes doesn't trigger an auto reset prompt when users have a custom prompt string for mode indicator.

Reproduction steps

  1. Change .zshrc file as below:
setopt prompt_subst
PROMPT='$(custom_prompt)'

custom_prompt() {
  if [[ $KEYMAP == "vicmd" ]]; then
    echo -n "vi cmd mode: "
  else
    echo -n "insert mode: "
  fi
}

source ~/zsh-vi-mode/zsh-vi-mode.zsh
  1. Open terminal and enter zsh
  2. Switch between INSERT and CMD modes via ESC and i
  3. The prompt doesn't change between vicmd mode: and insert mode:

Expected behavior

The prompt should be auto changed as expectation.

@jeffreytse jeffreytse added bug Something isn't working verified This issue was already verified labels Sep 20, 2023
@jeffreytse jeffreytse self-assigned this Sep 20, 2023
@jeffreytse
Copy link
Owner Author

Related to #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified This issue was already verified
Projects
None yet
Development

No branches or pull requests

1 participant