Subject: Re: Behaviour of zle list-choices
From: Joe M <[email-masked]>
To: [email-masked], [email-masked], [email-masked]
Date: Thu, 25 Feb 2016 21:54:56 -0600
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Hello Bart,

I have a multi-line prompt.

When I have an empty prompt and I press Ctrl-C, I get the next prompt.
But, when I have the list-choices active and I press Ctrl-C, the line
above the command is disappearing.

For example, this is the behavior when zle list-choices is not active
and I press Ctrl-C:

- (0:i:/tmp/zsh-build)  -  -  -  -  -  -  -
l
- (0:i:/tmp/zsh-build)  -  -  -  -  -  -  -

This is the behavior, when zle list-choices is active and I press
Ctrl-C:

- (0:i:/tmp/zsh-build)  -  -  -  -  -  -  -
l
ls
- (0:i:/tmp/zsh-build)  -  -  -  -  -  -  -

It should have been:

- (0:i:/tmp/zsh-build)  -  -  -  -  -  -  -
l
- (0:i:/tmp/zsh-build)  -  -  -  -  -  -  -
ls
- (0:i:/tmp/zsh-build)  -  -  -  -  -  -  -

When I "git bisect" zsh, I found that this:

691547cda60f0512c645e80246292936e660f326 is the first bad commit
commit 691547cda60f0512c645e80246292936e660f326
Author: Barton E. Schaefer <[email-masked]>
Date:   Wed Oct 29 08:45:57 2014 -0700

    33563: Completion/Base/Core/_main_complete, Src/Zle/complist.c: fix thinko in status message for INT/QUIT signals; check errflag in output loops

    Two semi-related patches for keyboard interrupt handling in completion,
    most importantly so that unexpectedly long completion listings can be
    interrupted.

:100644 100644 54fac61ca8d2f0d76020fe91c58600c425d6c6c8 676d2697968a06c855091681dd5ba4c8e15f6cf3 M        ChangeLog
:040000 040000 4bd268b6f03e9232602127edfa5c1d1257477a3a 0604aba5e8a729e0e3e28aa5aaaa9db0dba6a1ad M        Completion
:040000 040000 28150242dcea19e15813219cdae0c8bed8a0c3f6 7a23b88a420c221c2dd26b45e1ca0cac774a477d M        Src

Any kind comments, please?

Thanks
Joe

Joe M wrote:
> Hello,
>
> In an earlier release of zsh, when list-choices is active and I press
> "Ctrl-C", the current line gets killed and I get a new prompt.
>
> Now (zsh 5.2), When I press "Ctrl-C", I get the message: "TRAPINT:1:
> not an identifier".
>
> Any kind thoughts, please?
>
> Thanks
> Joe