TC7rc5 - Compare contents editor, 1 line copied too much

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

TC7rc5 - Compare contents editor, 1 line copied too much

Post by *white »

Already mentioned here. Copying a line break of a line without line number and pasting it will paste two lines.

Example:
  • Select two files and open the Compare contents dialog (menu Files/Compare By Content).
  • Go into Edit mode.
  • Select a line which is followed by an empty line without line number. The selection must include the line break (cursor on the next line).
  • Press Ctrl-C to copy the selection to clipboard.
  • Press Ctrl-V to paste the selection. An extra empty line is copied.
Compare with (bold text is different):
  • Select two files and open the Compare contents dialog (menu Files/Compare By Content).
  • Go into Edit mode.
  • Select a line which is followed by an empty line with line number. The selection must must include the line break (cursor on the next line).
  • Press Ctrl-C to copy the selection to clipboard.
  • Press Ctrl-V to paste the selection. No extra empty line is copied.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, I have already explained that this isn't a bug.

When you select a line break, you actually select TWO lines, the one with the line break, and the next one.

I have also explained that when you press Ctrl+C, you copy all selected lines, even those which are non-existant in the source file.
# Select a line which is followed by an empty line with line number. The selection must must include the line break (cursor on the next line).
# Press Ctrl-C to copy the selection to clipboard.
# Press Ctrl-V to paste the selection. No extra empty line is copied.
I cannot confirm that - TC pastes two lines in this case too!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:I cannot confirm that - TC pastes two lines in this case too!
If I have this screen shot.
And I press Ctrl-C directly followed by Ctrl-V.
And then do the same with line 6.
I get this screen shot.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Confirmed:
everything is copied/pasted normal, if no "not existing" line is involved,
an additional line is copied/pasted if a whole line is selected, where the following line is a "not existing" line in the actual file
(line "two" on the left side, cursor standing in the "not existing" line when copying).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, very strange. I will have a look at it after the release of TC7 final. It's not really such a big problem, and I fear that I will break a lot in the editor if I try to change that now.
Author of Total Commander
https://www.ghisler.com
Post Reply