(screen) problem with terminal wraparound
(screen) problem with terminal wraparound
am 26.12.2007 01:32:39 von gazelle
Running "GNU screen", I have a little problem with "cat". I have a file
with one very long line, and when I 'cat' the file in a terminal window
in screen (the terminal window is 80x25 - as shown in "stty -a"), it
truncates the characters between positions 81 and 145. I.e., the
display is like this:
123456789-123456789-123456789-123456789-123456789-123456789- 123456789-123456789-
X...
where X is the 146th char of the line, and ... is the remainder of the
line after char 146.
If I use something like 'less' to display the file, it comes up
correctly. I.e., I think 'less' honors the "stty" settings, but somehow
'cat' does not.
Further, if you test with this command line:
gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i);print ""}'
you get this output:
1 2 3 4 5 6 7 9
(weird that the last character on the line is "9", not "8").
If you pipe the above gawk command line into 'less' then everything is
fine.
Anyway, I'm pretty sure all of my 'stty' settings of 'rows' and
'columns' are correct, in all of the involved ttys. I think something
in screen got screwed up. This is a very long-running instance of
'screen', that I would rather not re-start, so I'd prefer to be able
to fix it.
I know that screen has zillions of internal parameters that can be
messed with (and, thus, messed up). Can anyone suggest something that
may be the cause of this?
Re: (screen) problem with terminal wraparound
am 27.12.2007 04:34:55 von Dave Kelly
On Dec 25, 6:32 pm, gaze...@xmission.xmission.com (Kenny McCormack)
wrote:
> Running "GNU screen", I have a little problem with "cat". I have a file
> with one very long line, and when I 'cat' the file in a terminal window
> in screen (the terminal window is 80x25 - as shown in "stty -a"), it
> truncates the characters between positions 81 and 145. I.e., the
> display is like this:
> 123456789-123456789-123456789-123456789-123456789-123456789- 123456789-123456789-
> X...
>
> where X is the 146th char of the line, and ... is the remainder of the
> line after char 146.
>
> If I use something like 'less' to display the file, it comes up
> correctly. I.e., I think 'less' honors the "stty" settings, but somehow
> 'cat' does not.
>
> Further, if you test with this command line:
>
> gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i);print ""}'
>
> you get this output:
>
> 1 2 3 4 5 6 7 9
>
> (weird that the last character on the line is "9", not "8").
> If you pipe the above gawk command line into 'less' then everything is
> fine.
>
> Anyway, I'm pretty sure all of my 'stty' settings of 'rows' and
> 'columns' are correct, in all of the involved ttys. I think something
> in screen got screwed up. This is a very long-running instance of
> 'screen', that I would rather not re-start, so I'd prefer to be able
> to fix it.
>
> I know that screen has zillions of internal parameters that can be
> messed with (and, thus, messed up). Can anyone suggest something that
> may be the cause of this?
SilverNail:~# gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i);print
""}'
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 2425 26 27
28 29
SilverNail:~#
Re: (screen) problem with terminal wraparound
am 02.01.2008 12:49:57 von Stephane CHAZELAS
On Wed, 26 Dec 2007 00:32:39 +0000 (UTC), Kenny McCormack wrote:
[...]
> gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i);print ""}'
>
> you get this output:
>
> 1 2 3 4 5 6 7 9
>
> (weird that the last character on the line is "9", not "8").
[...]
"9" might be the "9" of "29". Could be that you have "wrap" off.
Try r.
--
Stephane
Re: (screen) problem with terminal wraparound
am 03.01.2008 12:57:48 von gazelle
In article <477b7a65$0$897$ba4acef3@news.orange.fr>,
Stephane Chazelas wrote:
>On Wed, 26 Dec 2007 00:32:39 +0000 (UTC), Kenny McCormack wrote:
>[...]
>> gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i);print ""}'
>>
>> you get this output:
>>
>> 1 2 3 4 5 6 7
>9
>>
>> (weird that the last character on the line is "9", not "8").
>[...]
>
>"9" might be the "9" of "29". Could be that you have "wrap" off.
>Try r.
>
>--
>Stephane
This is now sorted (as of a day or two after original post).
It turns out there were two things going on (in some, but not all, of
the windows). (Somehow) wrap got turned off. And (somehow) the window
size (as seen in the output of ^Ai) got set to 145. After fixing both
of these things, things are back to normal now. Note that fixing the
window size is *not* easy.
I think this all happened after I accidentally did ^AS, which splits the
window. I think that sets some things that are hard to un-do. In
general, I think the split window feature is a good idea in theory, but
not useful in practice. I've tried it a few times (often by accident),
but never was comfortable with it.