Extra blank lines during paste

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
TCC 11.00.37 Windows XP [Version 5.1.2600]
TCC Build 37 Windows XP Build 2600 Service Pack 3

When running inside a Take Command frame, using copy/paste from the window
generates extra blank lines during the paste. The example below shows the
problem, but I'm actually getting it during a PVCS file checkin. My version
histories in that case are double spaced, which causes some amount of
mocking of me and trouble on my part.

If I detach the tab, the same procedure does not generate the extra blank
lines.

.) As an attached tab:

D:\>for /l %h in (1,1,3) do echo echo line %h
echo line 1
echo line 2
echo line 3

.) Use the mouse to mark the three lines, and right-click / Copy. Then
right-click / Paste. Notice below the extra blank lines before lines 2 and
3?


D:\>echo line 1
line 1

D:\>
D:\>echo line 2
line 2

D:\>
D:\>echo line 3
line 3

D:\>
D:\>

.) Now I detach the tab and right-click / Paste immediately:

D:\>echo line 1
line 1

D:\>echo line 2
line 2

D:\>echo line 3
line 3

D:\>


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
#2
On Thu, 07 Jan 2010 22:00:42 -0500, "JP Software Forums" <neil@jpsoft.com>,Jim
Cook <> wrote:

|D:\>for /l %h in (1,1,3) do echo echo line %h
|echo line 1
|echo line 2
|echo line 3
|
|.) Use the mouse to mark the three lines, and right-click / Copy. Then
|right-click / Paste. Notice below the extra blank lines before lines 2 and
|3?
|
|
|D:\>echo line 1
|line 1
|
|D:\>
|D:\>echo line 2
|line 2
|
|D:\>
|D:\>echo line 3
|line 3

Confirmed. A better description would be extra newlines. An extra newline
would genetate an empty command so all you'd see is the prompt at which it was
issued.
--
- Vince
 
#3
On Thu, 07 Jan 2010 23:03:30 -0500, vefatica <> wrote:

|On Thu, 07 Jan 2010 22:00:42 -0500, "JP Software Forums" <neil@jpsoft.com>,Jim
|Cook <> wrote:
|
||D:\>for /l %h in (1,1,3) do echo echo line %h
||echo line 1
||echo line 2
||echo line 3
||
||.) Use the mouse to mark the three lines, and right-click / Copy. Then
||right-click / Paste. Notice below the extra blank lines before lines 2 and
||3?
||
||
||D:\>echo line 1
||line 1
||
||D:\>
||D:\>echo line 2
||line 2
||
||D:\>
||D:\>echo line 3
||line 3
|
|Confirmed. A better description would be extra newlines. An extra newline
|would genetate an empty command so all you'd see is the prompt at which it was
|issued.

That is, the blank line is normal; the line showing only a prompt is not.
--
- Vince
 

rconn

Administrator
Staff member
May 14, 2008
10,096
85
#4
> When running inside a Take Command frame, using copy/paste from the
> window generates extra blank lines during the paste. The example
> below shows the problem, but I'm actually getting it during a PVCS
> file checkin. My version histories in that case are double spaced,
> which causes some amount of mocking of me and trouble on my part.
TCMD is not generating an extra blank line. What you actually get
(verifiable if you paste it into Notepad and then do a list /x) is:

Echo line 1<cr><lf>
Echo line 2<cr><lf>
Echo line 3<cr><lf>

The problem is that if you then paste that back into a TCC window, it's
interpreted as:

Echo line 1 <cr> - echo "line 1"
<lf> - no command, just display another prompt
Echo line 2 <cr> - echo "line 2"
<lf< - no command, just display another prompt

Etc. The TC command line input does not expect a line to be terminated by a
<cr><lf> (and you'd be REALLY annoyed if I changed it!).

Pasting multi-line input into a TCC window is not apt to produce useful
results.

Rex Conn
JP Software
 
#5
The place that I ran into this trouble is using our version control system.
I was typing in a change log and realized that I needed to edit the source
internal version string. I copied the text out of the TCC window and went
back to my editor.

When I came back in, I expected to be able to paste it. If the TCC is a tab
inside TCMD, I get the issue I reported. If TCC is stand-alone, it works as
I would hope.

Is there a way to get the TCC inside TCMD to behave the same way?

On Thu, Jan 14, 2010 at 7:40 PM, JP Software Forums <neil@jpsoft.com> wrote:


> ---Quote---
> > When running inside a Take Command frame, using copy/paste from the
> > window generates extra blank lines during the paste. The example
> > below shows the problem, but I'm actually getting it during a PVCS
> > file checkin. My version histories in that case are double spaced,
> > which causes some amount of mocking of me and trouble on my part.
> ---End Quote---
> TCMD is not generating an extra blank line. What you actually get
> (verifiable if you paste it into Notepad and then do a list /x) is:
>
> Echo line 1<cr><lf>
> Echo line 2<cr><lf>
> Echo line 3<cr><lf>
>
> The problem is that if you then paste that back into a TCC window, it's
> interpreted as:
>
> Echo line 1 <cr> - echo "line 1"
> <lf> - no command, just display another prompt
> Echo line 2 <cr> - echo "line 2"
> <lf< - no command, just display another prompt
>
> Etc. The TC command line input does not expect a line to be terminated by
> a
> <cr><lf> (and you'd be REALLY annoyed if I changed it!).
>
> Pasting multi-line input into a TCC window is not apt to produce useful
> results.
>
> Rex Conn
> JP Software
>
>
>
>
>


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
D

drrob1

Guest
#6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You need a filter program that removes the <cr> from the file. As this
is routinely needed in passing files from linux <-> dos/Windows, it
should be easy to find such a program. Linux has one it calls todos,
fromdos. Google for a windows/dos pgm. I wrote a pgm to remove the
<cr> years ago.

Jim Cook wrote:

> The place that I ran into this trouble is using our version control system.
> I was typing in a change log and realized that I needed to edit the source
> internal version string. I copied the text out of the TCC window and went
> back to my editor.
>
> When I came back in, I expected to be able to paste it. If the TCC is a tab
> inside TCMD, I get the issue I reported. If TCC is stand-alone, it works as
> I would hope.
>
> Is there a way to get the TCC inside TCMD to behave the same way?
>
> On Thu, Jan 14, 2010 at 7:40 PM, JP Software Forums <neil@jpsoft.com> wrote:
>
>
>
> ---Quote---
>> ---Quote---
>>> When running inside a Take Command frame, using copy/paste from the
>>> window generates extra blank lines during the paste. The example
>>> below shows the problem, but I'm actually getting it during a PVCS
>>> file checkin. My version histories in that case are double spaced,
>>> which causes some amount of mocking of me and trouble on my part.
>> ---End Quote---
>> TCMD is not generating an extra blank line. What you actually get
>> (verifiable if you paste it into Notepad and then do a list /x) is:
>>
>> Echo line 1<cr><lf>
>> Echo line 2<cr><lf>
>> Echo line 3<cr><lf>
>>
>> The problem is that if you then paste that back into a TCC window, it's
>> interpreted as:
>>
>> Echo line 1 <cr> - echo "line 1"
>> <lf> - no command, just display another prompt
>> Echo line 2 <cr> - echo "line 2"
>> <lf< - no command, just display another prompt
>>
>> Etc. The TC command line input does not expect a line to be terminated by
>> a
>> <cr><lf> (and you'd be REALLY annoyed if I changed it!).
>>
>> Pasting multi-line input into a TCC window is not apt to produce useful
>> results.
>>
>> Rex Conn
>> JP Software
>>
>>
>>
>>
>>
> ---End Quote---
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAktQZUUACgkQVRqaVGo2lhzI8QCgwBN2R6nDUF5zwxE9jSYLYmB1
GlkAn1HZSeG+Im2wTvaE1+2i104Mrom0
=e9KB
-----END PGP SIGNATURE-----
 

rconn

Administrator
Staff member
May 14, 2008
10,096
85
#7
> The place that I ran into this trouble is using our version control
> system.
> I was typing in a change log and realized that I needed to edit the
> source internal version string. I copied the text out of the TCC
> window and went back to my editor.
>
> When I came back in, I expected to be able to paste it. If the TCC is a
> tab inside TCMD, I get the issue I reported. If TCC is stand-alone, it
> works as I would hope.
You *are* able to paste it; the problem is your editor apparently doesn't
recognize CR/LF line endings.

The cut & paste when inside a tab window is done by Take Command; when in a
stand-alone TCC window it's done (in block mode, not line mode) by the
Windows console manager. There is absolutely no commonality between the
two.


> Is there a way to get the TCC inside TCMD to behave the same way?
No. You can have TCMD strip the CR/LF and append the lines when pasting,
but there's no way to strip only the CR or LF.

Rex Conn
JP Software