Author Topic: Current diff highlight in History Diff  (Read 2459 times)

LBCEi

  • Senior Community Member
  • Posts: 176
  • Hero Points: 12
Current diff highlight in History Diff
« on: August 01, 2019, 11:54:23 pm »
When using History Diff, I find it difficult to tell which diff line/block will be affected by the copy line/block buttons as there seems to be no highlighting of the currently active diff section.  Have I missed a setting somewhere to get something that tells me which parts of the file will be affected by these copy actions? 

Currently using 23.0.2 with all hotfixes on Windows 10.  This is not a new issue, however.

It does not appear to matter whether I'm in Source Diff mode or not.

I've also had a few instances where, after performing some selective 'reverts' using History Diff, my entire file/buffer was replaced by the contents (past or present, I'm not sure) of a completely different file/buffer (it just happened today, in fact).

Of course it will be difficult for me to provide repro steps for this, but let me know if I can do anything to help you track this down.

The lack of visibility of which diff is current is my biggest concern.  The other issue is intermittent.

BTW - I don't think this is restricted to History Diff but that is my most common use case of activating VSdiff.  For most other diff work I use Beyond Compare.

Thanks

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2343
  • Hero Points: 129
Re: Current diff highlight in History Diff
« Reply #1 on: August 02, 2019, 10:37:23 am »
The block or line that will be copied is the one that the cursor is in.  For the "regular" diff there is a box drawn around the current line.  I didn't realize that this isn't on for History Diff.  I'll get that turned on and it should be much easier to tell.

I've never seen the buffer be replaced like that.  In fact the other buffers are unnamed, so it really shouldn't be able to happen.  Unless you clicked Merge All by accident.

LBCEi

  • Senior Community Member
  • Posts: 176
  • Hero Points: 12
Re: Current diff highlight in History Diff
« Reply #2 on: August 02, 2019, 01:11:37 pm »
Actually, now that you mention it, I believe that when this has happened I did use 'Merge All'.  I was trying to revert to a previous version.  Of course, I expected to revert to a previous version of the same file, not a different file.  Can you help me understand what, if anything, I'm doing wrong? 

LBCEi

  • Senior Community Member
  • Posts: 176
  • Hero Points: 12
Re: Current diff highlight in History Diff
« Reply #3 on: August 02, 2019, 02:58:45 pm »
Also, while we are on the subject of diffs, I'd like to reiterate the request to add the option to have the "new" file on the right.

LBCEi

  • Senior Community Member
  • Posts: 176
  • Hero Points: 12
Re: Current diff highlight in History Diff
« Reply #4 on: August 02, 2019, 11:56:05 pm »
I tried a "regular" diff and there is indeed a box around the current line. Activating that in history diff (as you say you intend to do) would accomplish the desired effect of knowing "where I am".  You say "The block or line that will be copied is the one that the cursor is in."  However, I see no cursor unless I start to actually make edits.

I'll repeat/clarify my earlier question:  can you help me understand why using "Merge All" would replace a file with the contents of a completely different file?

Thanks

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2343
  • Hero Points: 129
Re: Current diff highlight in History Diff
« Reply #5 on: August 09, 2019, 10:37:44 am »
Sorry, for the slow reply:

I misread your original post and was thinking of Backup History, not History Diff.  When History Diff comes up, it has the Version combo box on the left set to the most recent version.  There shouldn't be any buttons to merge from the right to the left unless you select "Local file" in the Version combo box.

I added code to draw a box around the current line for Backup History and History diff.  It will be in v2019 Beta 3 - but I can send you a patched macro for 23.0.2 if you prefer.  When Diff (or any feature that does a diff really) first comes up, it puts the cursor at the first difference.  History Diff and Backup history are sort of different animals, because when you move through different versions at the top of the file, constantly putting the cursor at the first difference when you have already positioned the cursor would be annoying.  So it attempts to leave the cursor in place after it first comes up.

Merge All should merge all of the differences from whichever version is on the right, which is the one selected in the list at the top left, to the current local file.  It is the same as clicking "Copy Block"/"Delete Block" from the top of the file to the bottom of the file.  Is that not what you are seeing?

I will look into an option for putting the local file on the right.  The version control diff puts it on the left as well.

LBCEi

  • Senior Community Member
  • Posts: 176
  • Hero Points: 12
Re: Current diff highlight in History Diff
« Reply #6 on: August 09, 2019, 01:20:50 pm »
Thanks. 

A box around the current line will help a lot.  You can send me a patch if you want me to test it, otherwise I can wait for the next release.

As for the issue with a buffer being replaced by a different file, I don't have a consistent repro case so I'm not going to be much help there.  It has only happened a couple of times and I don't know if I did anything unique when it did happen.  I'll keep my eyes open for any recurrence.  I am curious as to why you raised Merge All as a possible suspect.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2343
  • Hero Points: 129
Re: Current diff highlight in History Diff
« Reply #7 on: August 09, 2019, 01:26:46 pm »
PM me an email address and I'll send you an updated macro.

I am curious as to why you raised Merge All as a possible suspect.

Just because you could hit it by accident and merge the entire file.

LBCEi

  • Senior Community Member
  • Posts: 176
  • Hero Points: 12
Re: Current diff highlight in History Diff
« Reply #8 on: August 12, 2019, 04:20:34 pm »
FYI

The 'box around current line' feature does not appear to have made it into V24B2.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2343
  • Hero Points: 129
Re: Current diff highlight in History Diff
« Reply #9 on: August 13, 2019, 11:30:38 am »
Must have missed the cut off.  It's checked in so it should be there in B3.  Sorry about that.