Compare by Content, Editmode: copies non-existing lines

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
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Compare by Content, Editmode: copies non-existing lines

Post by *StatusQuo »

When you compare two files, with one file (on the right) having some additional lines,
copy some text from the left, including the empty space without line numbers.
When inserting the copied passage on the other side,
a new line is added on the right panel for every non-existing line within the copied range on the left panel.

Screenshots available from copy, paste and result.

=> I think, lines that do not exist yet (which means they don't have a line number),
should not be copied to clipboard, should they?
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) »

Indeed I thought about this a lot, but decided to implement it this way just because the user selected these lines! It would look strange if only the lines with text would be inserted. The user can still delete the lines if he doesn't want them.
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:Indeed I thought about this a lot, but decided to implement it this way just because the user selected these lines! It would look strange if only the lines with text would be inserted. The user can still delete the lines if he doesn't want them.
I agree with StatusQuo, lines without line numbers should not be copied to clipboard. Empty lines with line number should be copied.
Note that when you use the Copy buttons no lines are created for empty lines without line number.

When testing this I found the following:
When copying lines without line number, one empty line too many is created. Example:
* Mark an empty line without line number and copy to clipboard. Pasting this line will add two empty lines instead of one.
Post Reply