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

Re: Terminal problem with linux-2.0.34



On Mon, Feb 15, 1999 at 10:58:23AM +0100, you [Peter Stephenson] claimed:
> vherva@xxxxxxxxxxxxxxxxx wrote:
> > The flaw in the terminal handling appears as follows: when I type text
> > on the command line, only the first two characters are echoed. The line
> > does show up, if erase a character. Also, the command line is only
> > executed after I press return twice.
> 
> Is that the first two characters including the prompt, or after the prompt?
> Might help tell if it's really in the zsh code or maybe a bug in a tty
> driver.

That's two chars after the prompt - although I occasionally get three or
four.

> It looks like it may be impossible to track down remotely, but here are
> some other things you could jiggle to see; they are just random counsels of
> despair, really.
> 
> 1. Try setting TERM to something different (e.g. vt100)

I've tried atleast xterm, xterm-color and vt100 and ansi. The problem
appears with all of them.

> 2. Try resetting the terminal before each line, for example
>   precmd() { reset; }    or    precmd() { tset; }
> depending what you have available.

That had no effect either.

> 3. Try running `script' and looking to see if there's anything funny in the
> transcript of a short session.  Chances are there isn't, since the problem
> with `return' suggests it's not just on output.  In particular, does
> deleting (which you say brings the line back) show up as anything more than
> a ^H ?  

Pressing backspace does not bring the line back (it seems to invisibly
delete the char backwards, though), but if I move backwards with left
arrow and press ctrl-d, the line gets echoed and the character is erased
as it should be.

> Also, when you need to type two returns to get it to work, do both
> show up in the transcript as ^M or only one?  (If the option promptcr is
> set, you get a second ^M at the beginning of the new prompt anyway.)
> 
> 4. Try recompiling with TTY_NEEDS_DRAINING defined to 1 (you can simply put 
> #define TTY_NEEDS_DRAINING 1
> at the top of zle_main.c since it doesn't seem to appear in the
> configuration stuff.)  Can't see why it should be this, either, but then I
> can't see why it should be anything else.
> 
> 5. If the two characters you do get on the line are after the prompt, maybe
> it's connected with the `clear-to-end-of-line' you get at the end of the
> prompt.  Try setting TERMCAP (if that works on Linux) to:
> xterm|vs100|xterm terminal emulator:\
>         :am:km:mi:ms:xn:bs:pt:\
>         :co#80:li#65:\
>         :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
>         :LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:\
>         :cd=\E[J:cl=\E[H\E[2J:cm=\E[%i%d;%dH:\
>         :cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:ho=\E[H:\
>         :ic=\E[@:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
>         :k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:kb=\b:\
>         :kd=\EOB:ke=\E[?1l:kl=\EOD:kr=\EOC:ks=\E[?1h:ku=\EOA:\
>         :nd=\E[C:r1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H:\
>         :r2=@kf1=\EOP:rc=\E8:sc=\E7:se=\E[m:so=\E[7m:sr=\EM:\
>         :st=\EH:up=\E[A:
> (I've deliberately removed :ce=\E[K: from this.)

I will try script, TTY_NEEDS_DRAINING and the TERMCAP ASAP, I'll report
the result. 

Thanks for the response!


--
Ville Herva       Ville.Herva@xxxxxxxxxx   +358-50-5164500
Netspan Oy        netspan@xxxxxxxxxx       PL 65  FIN-02151 Espoo
PGP key available: http://www.iki.fi/v/pgp.html



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