zsh-users
 help / color / mirror / code / Atom feed
* Behaviour of zle list-choices
@ 2016-02-26  2:44 Joe M
  2016-02-26  3:40 ` Eric Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Joe M @ 2016-02-26  2:44 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-26  2:44 Behaviour of zle list-choices Joe M
@ 2016-02-26  3:40 ` Eric Cook
  2016-02-28 13:40   ` Joe M
  2016-02-26  3:54 ` Joe M
  2016-02-26 11:17 ` Peter Stephenson
  2 siblings, 1 reply; 10+ messages in thread
From: Eric Cook @ 2016-02-26  3:40 UTC (permalink / raw)
  To: zsh-users

On 02/25/2016 09:44 PM, 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
> 
what does ''type -f TRAPINT'' display?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-26  2:44 Behaviour of zle list-choices Joe M
  2016-02-26  3:40 ` Eric Cook
@ 2016-02-26  3:54 ` Joe M
  2016-02-26 11:17 ` Peter Stephenson
  2 siblings, 0 replies; 10+ messages in thread
From: Joe M @ 2016-02-26  3:54 UTC (permalink / raw)
  To: zsh-users, zsh-workers, schaefer

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

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 <schaefer@zsh.org>
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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-26  2:44 Behaviour of zle list-choices Joe M
  2016-02-26  3:40 ` Eric Cook
  2016-02-26  3:54 ` Joe M
@ 2016-02-26 11:17 ` Peter Stephenson
  2016-02-26 18:39   ` Bart Schaefer
  2 siblings, 1 reply; 10+ messages in thread
From: Peter Stephenson @ 2016-02-26 11:17 UTC (permalink / raw)
  To: zsh-users

On Thu, 25 Feb 2016 20:44:19 -0600
Joe M <joe9mail@gmail.com> wrote:
> 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".

There was a bug here that's been fixed, where Ctrl-C didn't abort in the
way you expected.  It affected menu selection --- zsh-workers/37643,
commit 1d8b528522.  I don't have time now to check if it's the same one
affecting listing, I'm afraid, though it's obviously very similar.  I
hope that fixes this version of the problem, though I don't remember
this particular symptom.

pws



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-26 11:17 ` Peter Stephenson
@ 2016-02-26 18:39   ` Bart Schaefer
  2016-02-27 23:09     ` Joe M
  0 siblings, 1 reply; 10+ messages in thread
From: Bart Schaefer @ 2016-02-26 18:39 UTC (permalink / raw)
  To: zsh-users

On Feb 26, 11:17am, Peter Stephenson wrote:
}
} There was a bug here that's been fixed, where Ctrl-C didn't abort in the
} way you expected.

I don't entirely understand Joe's description of his multi-line prompt
(it looks like he may have lines BELOW the input position?), but this
appears to work as expected with my own multi-line prompt (one line
above the input) and list-choices.

It's not quite the same thing as menu selection because it's not in the
menu navigation loop, it just has to clear the completion list before the
prompt is redrawn.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-26 18:39   ` Bart Schaefer
@ 2016-02-27 23:09     ` Joe M
  2016-02-28  6:47       ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Joe M @ 2016-02-27 23:09 UTC (permalink / raw)
  To: zsh-users


[-- Attachment #1.1: Type: text/plain, Size: 483 bytes --]

Hello Bart,

> I don't entirely understand Joe's description of his multi-line prompt
> (it looks like he may have lines BELOW the input position?), but this
> appears to work as expected with my own multi-line prompt (one line
> above the input) and list-choices.

I recorded the console behavior using ttyrec. I am attaching the
ttyrecord.ttyrec file. I am not sure if you use ttyrec. If not,
"ttyplay ttyrecord.ttyrec" will show the behavior that I am talking
about.

Thanks
Joe


[-- Attachment #1.2: ttyrecord.ttyrec --]
[-- Type: application/octet-stream, Size: 19476 bytes --]

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-27 23:09     ` Joe M
@ 2016-02-28  6:47       ` Bart Schaefer
  2016-02-28 13:59         ` Joe M
  0 siblings, 1 reply; 10+ messages in thread
From: Bart Schaefer @ 2016-02-28  6:47 UTC (permalink / raw)
  To: zsh-users

On Feb 27,  5:09pm, Joe M wrote:
}
} I recorded the console behavior using ttyrec.

Thanks, but I'm still not able to reproduce that behavior.  It looks
as though you may be using zsh-syntax-highlighting or some similar
add-on configuration -- are you sure that's not a contributing factor?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-26  3:40 ` Eric Cook
@ 2016-02-28 13:40   ` Joe M
  2016-02-28 13:56     ` Joe M
  0 siblings, 1 reply; 10+ messages in thread
From: Joe M @ 2016-02-28 13:40 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

Hello Eric,

> > 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".
>
> what does ''type -f TRAPINT'' display?

type -a -f TRAPINT
TRAPINT () {
        ft_zle_state[minibuffer]=no
        ft-psvx-default
        zle reset-prompt 2> /dev/null
        return 127
}

Does that help?

Thanks for checking this out,
Joe

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-28 13:40   ` Joe M
@ 2016-02-28 13:56     ` Joe M
  0 siblings, 0 replies; 10+ messages in thread
From: Joe M @ 2016-02-28 13:56 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

Hello Eric,

> > > 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".
> >
> > what does ''type -f TRAPINT'' display?
>
> type -a -f TRAPINT
> TRAPINT () {
>         ft_zle_state[minibuffer]=no
>         ft-psvx-default
>         zle reset-prompt 2> /dev/null
>         return 127
> }

Thanks for your suggestion. Removing the above TRAPINT fixed the
issue that I am noticing.

Thanks a lot,
Joe

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Behaviour of zle list-choices
  2016-02-28  6:47       ` Bart Schaefer
@ 2016-02-28 13:59         ` Joe M
  0 siblings, 0 replies; 10+ messages in thread
From: Joe M @ 2016-02-28 13:59 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

Hello Bart,

> } I recorded the console behavior using ttyrec.
>
> Thanks, but I'm still not able to reproduce that behavior.  It looks
> as though you may be using zsh-syntax-highlighting or some similar
> add-on configuration -- are you sure that's not a contributing factor?

Thanks a lot for checking on this issue. It was caused by my
customization. Sorry for not checking my setup thoroughly before
raising the issue.

Thanks again,
Joe

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-28 13:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26  2:44 Behaviour of zle list-choices Joe M
2016-02-26  3:40 ` Eric Cook
2016-02-28 13:40   ` Joe M
2016-02-28 13:56     ` Joe M
2016-02-26  3:54 ` Joe M
2016-02-26 11:17 ` Peter Stephenson
2016-02-26 18:39   ` Bart Schaefer
2016-02-27 23:09     ` Joe M
2016-02-28  6:47       ` Bart Schaefer
2016-02-28 13:59         ` Joe M

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).