On 4/29/22, Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
> thanks, I ended doing it like this:
>
> zle-line-init(){
> [[ -n $__precmd_buffer ]] && {
> BUFFER=$__precmd_buffer
> CURSOR=$__precmd_cursor
> }
> }
>
> and storing the current line and cursor position with:
>
> set_precmd_buffer() {
> __precmd_buffer=$BUFFER
> __precmd_cursor=$CURSOR
> }
> zle -N set_precmd_buffer set_precmd_buffer
> bindkey "^X^[e" set_precmd_buffer
>
> best regards!
Perhaps you would like to know about the accept-and-hold widget (bound
to alt-a by default)?
--
Mikael Magnusson