Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Overeager completion?



Hi!

Oliver Kiddle wrote:

> ...
>  
> > Oops.  Then, for good measure, hit ^C twice to quit the shell.  :)
> 
> That could be a bug. Seems to occur after any ^D used to list choices.

Indeed. I think I've tracked it down, but no patch yet. The problem is
that getkey() returns EOF and in zle_keymap.c:1289 `c' (the variable
holding the code of the character typed last) is reset to `lastc'
which, at that time, contains the ^D. So the first ^C erases the line
and the second one (where `c' ist again set to the ^D from `lastc')
makes the test in zle_main.c:655 be true -- and exit the shell.

Maybe we should zero out that `lastc' when we get a ^C around line
zle_main.c:600. But I'm not sure whether we should turn `lastc' into a
global variable or make getkey() return a special value for that...


Bye
  Sven

-- 
Sven Wischnowsky                          wischnow@xxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author