Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: History still coredumping after "print -s" during completion
- X-seq: zsh-workers 11642
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Wayne Davison <wayne@xxxxxxxxx>
- Subject: Re: History still coredumping after "print -s" during completion
- Date: Mon, 29 May 2000 22:47:21 +0000
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <Pine.GSO.4.21.0005291411310.22792-100000@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <Pine.GSO.4.21.0005291411310.22792-100000@xxxxxxxxxxxxxxx>
On May 29, 2:30pm, Wayne Davison wrote:
} Subject: Re: History still coredumping after "print -s" during completion
}
} + It tweaks execzlefunc() so that, when it calls a completion
} widget, it ensures that if we were at curline, we're still at
} curline. This change assumes that completion never causes us to
} change to a different history line. If this is not true, we'll
} need a different fix.
Completion shouldn't ever cause us to change to a different history line,
but an ordinary ZLE widget might.
foo() {
zle up-line-or-history
print -s "Hi there"
zle down-line-or-history
}
zle -N foo
bindkey ^Xj foo
} With these changes, your example now works right:
}
} % ls <C-x?><C-n>
}
} This will now fail to move downward (since there's nowhere to go),
} and a <C-p> will show you the newly-added history line.
Yay! Thanks, Wayne.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author