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

RE: Debug / cut'n'paste on IRIX



[I am sorry for all these mails]

>
> that's what happens. I could not find the relevant part in
> sources - anybody (Geoff) - could you get a look:
>
> Cut'n'pasted in another shell. As you see, after it gets first
> new line it does ioctl(10, TCSETSW,...) before PS2, that,
> unfortunately, throughs away all pending input :-( The following
> FIONREAD is useless in this case.
>


Looks, like it is done in settyinfo(), that is (unconditionally) called from
trashzle() that is called from zleread() after we've seen new line. (It is
actually using tcsetattr() on our system)

Fixing it is probably not trivial. Currently, the only place where FIONREAD
is used is setupterm(). If we find typeahed, we avoid calling sttyinfo() at
all. May be, we should come up with a single function that checks for
typeahead, reads it in buffer and changes tty modes after that?

And I wonder, if this is all ... We already had (still unresolved) case with
read -q ...

/andrej



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