screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [bug #35862] Corrupted data in Copy/Paste using mouse


From: Adrian
Subject: [screen-devel] [bug #35862] Corrupted data in Copy/Paste using mouse
Date: Sun, 29 Apr 2018 01:22:32 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #1, bug #35862 (project screen):

This bug seems to have been around forever (Bug report from 2004 on the Debian
bug tracker at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286063 ), is
very easy to reproduce, quite annoying to say the least (data loss), yet does
not even have the status confirmed... So I add few more test results and a
simple recipe to reproduce:

1) Take some large text file (say 1e4 lines) or generate one:

(echo "N=0;"; for n in {1..10000}; do echo "N+=$n;"; done) >testscript.m


2) Open that file in your favorite text editor and select everything
3) Launch an xterm
4) Launch a screen session:

exec screen $SHELL


(exec may be omitted without affecting the result)
5) Type

cat >foobar


6) Paste the selection into the terminal by mouse-middle-button
7) Return to the command prompt by typing Ctrl-d to end cat
8) Type

diff testscript.m foobar


_Expected result_
No difference

_Observed behaviour_
Sporadic differences showing that some pasted characters where never received
by cat

Example:

$> diff testscript.m foobar 
3365c3365
< N+=3364;
---
> N+=336
4674c4674
< N+=4673;
---
> N+=73;
6495c6495
< N+=6494;
---
> =6494;
8258,8259c8258
< N+=8257;
< N+=8258;
---
> N+=8257N+=8258;


- Note that if you skip step 4 then step 8 shows no difference between the
original and the pasted file.

- The following terminals and shells where tried:
Terminal: xterm, UXTerm, Xfce Terminal
Shell: zsh, bash
In all combinations pasting succeeds without error when *no* screen is
started. In all combinations starting a screen session and pasting produces
random input loss with the above 'cat' test.

- Alternatively you can launch nano, vim, emacs -nw.  The buffer saved from
the text editors will be different from the pasted data.

- Still as an alternative to step 5, you can launch

octave --no-gui --no-history


The test script given above contains valid octave commands and should lead to
a final value N=5000050000. Type N<return> at the octave prompt to show the
value of N after pasting. When octave is run under screen, the value of N is
less than expected final result, showing that some instructions were not
processed. Note also that the command counter in the prompt will be smaller
than the number of lines you pasted.

System: 
Up-to-date Debian/testing GNU/Linux 
Screen version 4.06.02 (GNU) 23-Oct-17
Kernel 4.15.0-2-amd64


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35862>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]