Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: line wrap over in xterm/konsole
Date: Sat, 22 Jun 2019 08:13:31
Message-Id: 1745942.G7Jnr0FJKU@dell_xps
In Reply to: Re: [gentoo-user] Re: line wrap over in xterm/konsole by Grant Taylor
1 On Saturday, 22 June 2019 00:44:28 BST Grant Taylor wrote:
2 > On 6/21/19 5:03 PM, Jorge Almeida wrote:
3 > > ## equery uses x11-terms/xterm
4 > > [ Legend : U - final flag setting for installation]
5 > > [ : I - package is installed with flag ]
6 > > [ Colors : set, unset ]
7 > >
8 > > * Found these USE flags for x11-terms/xterm-337:
9 > > U I
10 > > - - Xaw3d : Add support for the 3d athena widget set
11 > > + + openpty : Use openpty() in preference to posix_openpt()
12 > > - - toolbar : Enable the xterm toolbar to be built
13 > > + + truetype : Add support for FreeType and/or FreeType2 fonts
14 > > + + unicode : Add support for Unicode
15 > > - - xinerama : Add support for querying multi-monitor screen geometry
16 > > through>
17 > > the Xinerama API
18 > >
19 > > ~
20 >
21 > That's what I expected.
22
23 These USE flags are the same like mine.
24
25
26 > > Ah, no, it doesn't. I thought Mick's problem was with the shell.
27 >
28 > Ah.
29
30 I don't think it is a shell related problem (but may be wrong). After all
31 changing the shell option in .bashrc does not affect the display within the
32 xterm window.
33
34
35 > > Shrinking the window truncates the visible lines. Restoring the size
36 > > doesn't restore the truncated contents.
37 >
38 > Agreed.
39
40 This is the problem I was describing as 'annoying'. Xterm draws the output
41 once to fill in the real estate of the current xterm window, but changing the
42 window width does not redraw each line to reflow it across the new window
43 width.
44
45
46 > > This was expected. After all, the output of "cat foo" is not processed
47 > > through readline.
48 >
49 > I don't think that readline has anything to do with this.
50 >
51 > > Maybe I misunderstood the OP's problem?
52 >
53 > Ah.
54
55 Apologies for my confusing description - I'll have another go below.
56
57
58 > > (But then, how can rxvt behave differently?)
59 >
60 > I don't know about rxvt per say.
61 >
62 > But I thought there was a common library (libterm?) used by a number of
63 > terminal emulators that actually saved the output to a temporary file.
64 > That way they could re-display the output if (when) the window size changed.
65
66 I ran ldd and as is logical I can see there are some differences in the libs
67 used by both programs. Neither of them use libterm.
68
69
70 > After emerging and testing rxvt, yes, it will rewrap the line to the new
71 > window width. It seems as if it saves the output as discreet lines and
72 > re-wraps them individually based on the terminal width. So, the output
73 > of an ls -l in a 132 character window, causes each line to be re-wrapped
74 > (as below) when reducing the window width.
75 >
76 > This 40 character wide…
77 >
78 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
79 > bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
80 > cccccccccccccccccccccccccccccccccccccccc
81 > dddddddddddddddddddddddddddddddddddddddd
82 >
83 > …becomes this 30 character wide.
84 >
85 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
86 > aaaaaaaaaa
87 > bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
88 > bbbbbbbbbb
89 > cccccccccccccccccccccccccccccc
90 > cccccccccc
91 > dddddddddddddddddddddddddddddd
92 > dddddddddd
93
94 In my systems urxvt will wrap lines when shrinking the width of the window AND
95 unwrap them when increasing the width of the window. This is happening in
96 real time as the window expands/contracts.
97
98 Again in my systems xterm will truncate lines when shrinking the width of the
99 window. This truncated output is now lost. Increasing the width of the
100 window will not restore the truncated lines. Scrolling up will now draw lines
101 in the new full width of the xterm window, but the truncated lines remain
102 truncated and their information is lost.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Re: line wrap over in xterm/konsole Grant Taylor <gtaylor@×××××××××××××××××××××.net>