You are not logged in.

#1 2009-05-04 14:26:12

Lars Stokholm
Member
From: Denmark
Registered: 2009-03-17
Posts: 223

xterm sometimes fail to wrap when typing

When typing a long command (beyond the window edge) xterm will sometimes fail to wrap to a new line and instead begin writing over the current line. It's like it does a \r (carriage return) when it should have done a \n (new line).

The result is sort of what you'd get if you did 'echo -e "SOME_COMMAND_BLAH_BLAH_BLAH\rTHIS_SHOULD_BE_WRAPPED"'.

Of course this scrambles everything I do to an extend where xterm becomes unusable and often I have to close the corrupted xterm and open another. It's really starting to annoy me. smile I can't image what might cause this, but the problem seems to come up when I've been using the xterm for some time (some different tasks). Newly opened xterms are always fine.

Last edited by Lars Stokholm (2009-05-04 14:28:07)

Offline

#2 2009-05-04 15:44:48

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: xterm sometimes fail to wrap when typing

Use 'reset' to fix a "broken" terminal instead of opening a new one, this should ease things. Terminal state can be altered by certain control sequences/characters, e.g. if you cat a binary file you're likely to end up with a terminal that needs a reset. Other than that, a bad PS1 string may cause readline to get confused about the available line space if escape sequences are not wrapped in \[ and \].

Offline

#3 2009-05-05 11:36:26

Lars Stokholm
Member
From: Denmark
Registered: 2009-03-17
Posts: 223

Re: xterm sometimes fail to wrap when typing

Thanks, that will definately be easier than what reopening the terminal.

Offline

#4 2011-02-07 20:24:07

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: xterm sometimes fail to wrap when typing

Is this the problem when the output of some command overwrites the prompt? I can remember some trick to make sure ps1 is always preceded by a newline to prevent this.

Offline

#5 2011-02-08 07:26:12

Lars Stokholm
Member
From: Denmark
Registered: 2009-03-17
Posts: 223

Re: xterm sometimes fail to wrap when typing

I don't know if it overwrites the prompt but it doesn't even reach the edge of the terminal window. The same thing happens in rxvt-unicode.

Offline

#6 2011-02-08 14:47:10

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: xterm sometimes fail to wrap when typing

does it happen quite often? If so, try to triage what you are doing just before it happens? opening a certain file, a particular alias that you are using might be in conflict with something.

I have seen that happen to me a couple of times in urxvt.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB