Author Topic: Changing Diff Options  (Read 2609 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2159
  • Hero Points: 191
  • Text
Changing Diff Options
« on: May 10, 2017, 06:30:08 pm »
Seems like the only way to change Diff options is via the main Diff UI (Tools -> File Difference).
But, diffing side-by-side appears in many different UIs (such as file history, Version control, etc).
So, one needs to plan ahead carefully - going to diff options and selecting what you want, saving, then invoking the UI which opens diff. (Tricky, with things like "Exiting with modified buffers").

The side-by-side UI should have a way to change options and update the diff display.

Some UIs have a SourceDiff/LineDiff button (File history).
Others, like Git->CompareWithRepo has "Re-diff", but not SourceDiff/LineDiff.
Sometimes when starting a diff Slick with pop a dialog complaining about encoding and/or line ending differences.
There are other seemingly random differences, like some UIs have the 'Undo' button, and others don't.
Sometimes there are 'Open' and/or 'Saveas' (Or save1 and save2) buttons - but not always, even in places where it would make sense.
Sometimes "Read only" checkboxes are available/displayed, sometimes not.

#1: There should always be an "Options" button, and when options are changed, "Rediff" should automatically happen.

#2: The various places that can open Diff should be made to be consistent.
They should all have the same set of options available, though in some cases buttons or menu items may need to be greyed when they don't make sense for some reason.



jporkkahtc

  • Senior Community Member
  • Posts: 2159
  • Hero Points: 191
  • Text
Re: Changing Diff Options
« Reply #1 on: May 15, 2017, 08:00:49 pm »
Another one: In Multifile replace -> Preview All there is a "File>>" button, which seems to do the same thing LeftToRight, that "<<Merge All" does, left to right in other contexts.


PreviewAll has a bigger inconsistency: The "New" file is on the right, and the old/original readonly is on the left.
It seems like in most contexts though the "New" file is on the left and the older on the right - where the right is sometimes readonly.
For example backup history, CompareDirectoryWithGit, VersionControl->Diff with most up to date version.

sigmund

  • Community Member
  • Posts: 89
  • Hero Points: 9
Re: Changing Diff Options
« Reply #2 on: May 23, 2018, 02:23:14 pm »
It would be great if there was a setting that would determine if the new file should be displayed on the left or right when doing a diff.

I prefer to have the old file on the left and the new file on the right.  In certain cases it is easy to hack Slick to fix this, e.g. in "C:\Program Files\SlickEdit Pro 22.0.2\macros\se\vc\GitClass.e" I have this change:

Code: [Select]
      if ( remoteFilename=="" ) {
         diff('-modal -bi2 -r2 '_maybe_quote_filename(localFilename)' 'originalFileWID.p_buf_id);
      } else {
         diff('-modal -bi2 -r2 -file2title '_maybe_quote_filename(remoteFilename)' '_maybe_quote_filename(localFilename)' 'originalFileWID.p_buf_id);
      }
->
Code: [Select]
      if ( remoteFilename=="" ) {
         diff('-modal -bi1 -r1 'originalFileWID.p_buf_id' '_maybe_quote_filename(localFilename));
      } else {
         diff('-modal -bi1 -r1 -file1title '_maybe_quote_filename(remoteFilename)' 'originalFileWID.p_buf_id' '_maybe_quote_filename(localFilename));
      }

For the Backup History (the History Diff) it is more work since the form needs to be updated..

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3217
  • Hero Points: 459
Re: Changing Diff Options
« Reply #3 on: August 27, 2020, 11:37:31 pm »
FYI:  Slickedit Pro 2020 Beta4 will add an option so you can have "Preview All" show the modified file on the left.

sigmund

  • Community Member
  • Posts: 89
  • Hero Points: 9
Re: Changing Diff Options
« Reply #4 on: October 15, 2020, 03:45:20 pm »
I recently switched to SlickEdit Pro 2020, but I cannot find this option.

What I want is to always show the "old" file (or the file version that was first selected in the backup/file history) on the left and the "new" file (or the file version that was selected second in the backup/file history) on the right.  This way the diff goes in the direction that I am reading, i.e. left to right.

I guess I could change my ways, but I am very used to this and it is how I have configured diffing everywhere else.
« Last Edit: October 15, 2020, 03:51:25 pm by sigmund »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3217
  • Hero Points: 459
Re: Changing Diff Options
« Reply #5 on: October 15, 2020, 03:58:02 pm »
Tools > Options > Enter search text > "left"

The 4th match is:

    Editing > Search > "Preview All shows modified files(s) on the left"

sigmund

  • Community Member
  • Posts: 89
  • Hero Points: 9
Re: Changing Diff Options
« Reply #6 on: October 15, 2020, 04:09:26 pm »
Found it, thanks!