Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

`reset-prompt` multiple times cause multiline PROMPT redraw in the wrong place



Hello,

If I add a vim mode indicator to a multiline PROMPT, then the sequence
`^[i` (alt-i) will cause the prompt redraw in the wrong place.

The problem seems to be that `reset-prompt` is called multiple times in one
execution cycle.

Following is a minimal .zshrc:

```
zle-keymap-select() {
  zle .reset-prompt
}
zle -N zle-keymap-select

zle-line-init() {
  zle .reset-prompt
}
zle -N zle-line-init

bindkey -v

setopt promptpercent promptsubst
autoload -U promptinit
promptinit
PROMPT='%~$prompt_newline $KEYMAP >> '
```

Leo


Messages sorted by: Reverse Date, Date, Thread, Author