On Mon, 17 Oct 2011, Marco d'Itri wrote:

Maybe the ncurses maintainer can give some hints?

On Oct 17, Jonathan Nieder <[email protected]> wrote:

Jonathan Nieder wrote:
Marco d'Itri wrote:

Lines wider than the screen often contain an embedded newline character
at the right screen border. This makes copy and paste of these lines
impossible and makes using the shell very frustrating.

Could you give an example?  Typing a long command at the bash prompt,
gnome-terminal copies and pastes it without trouble.

Taking examples from the bugs you listed: copying from 'less' works
find for me now, while 'more' still exhibits the problem.

I don't see how to work on this as a bash bug, but please feel free to
reopen if I'm missing something.

You can see some of the issue by collecting a "typescript" file from running the test in "script". bash (and other programs) rely on the terminal emulator's behavior when automatically (or not) wrapping at the right margin. Analyzing the typescript is hard work though...

xterm for instance keeps track of when an application writes past the right margin (writes a series of characters without intervening control sequences that make it auto-wrap to the next line), and treats the two lines as joined for the purpose of selection).

I have an faq entry here which deals with some differences between xterm/rxvt and some other terminals in their behavior for wrapping:

http://invisible-island.net/xterm/xterm.faq.html/grep_colors

I think the point is that gnome-terminal is doing something like xterm, that bash is getting confused about the window's size and setting up the preparation for wrapping in some way incorrectly - or else that gnome-terminal is different from bash's expectations. I've seen reports
or done my own analysis which could support either, but I'm uncertain
which is the case here.  (neither is a problem with ncurses, by the way).

So... the first thing to do would be to determine how to reproduce the
effect that Jonathan is describing.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to