Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
`reset-prompt` multiple times cause multiline PROMPT redraw in the wrong place
- X-seq: zsh-workers 42067
- From: Pika Mao <leomaoyw@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: `reset-prompt` multiple times cause multiline PROMPT redraw in the wrong place
- Date: Fri, 01 Dec 2017 10:04:30 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=jA5fEZb0mIxdwi8/VxdmEyzr1Fbu3I7dGy++xMhF2Vg=; b=lOGwIhs1hfKQP5EUlg3RfNlyLXgaZUCl1lmeBmlzwMph+ChGa0g1uNCCwRxt0H09Ij oRiG5SbOeiltMzWzVbaUX+pqAkiuXUvAJE8ZkpXlO48fOQrpFDyDMyFIHPpp7e/3Ugpx YGW0oXTYCR/4lDkAzToAj29v8Sk0t7GRkm3T6fE/6Os2fz0zgt/ioYj5T1LN7lLno4Zt UMYHwjkO/H6p5e0ZSsb0R6IQIGruCUg2+mVtbGOsb0i5UzZdY8TKZEECfc2UqPJmIwwX 4ly+XGfpP3SsHq7+xyAbg00iHCM82g2DHauWv/sRhhkGNh5kntjA9mnzmU9w7+NanTLQ 0BAw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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