Author Topic: Live diff  (Read 525 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Live diff
« on: August 02, 2022, 05:28:27 PM »
Very cool new feature!

#1 needs an option to deal with CRLF differences with git.
My build.bat file has every line marked with !=, though nothing is different.

#2 A toolbar or keybindings to control live diff would be nice too.

#3 I can edit the text in deleted lines.

#4 I can delete deleted lines with cut-line. (they reappear after refresh delay).

#5 I can select, but not copy text in deleted lines. Select and copy should be possible.

#6 If I delete a line, then select+copy several lines including the deleted line, the deleted line is included in the copied text. Probably shouldn't be? I dunno, having deleted text visible makes for some weird cases.

A: Is there a way to control the refresh delay?

B: A context menu for live diff to undo individual changes would be nice.
Hover over the != in the left margin should have a popup saying "live diff, line modified" or "live diff, line deleted.

C: The + and - symbols for livediff are confusing with the syntax expansion +/- symbols being the same, but different colors.


Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2894
  • Hero Points: 153
Re: Live diff
« Reply #1 on: August 02, 2022, 05:56:13 PM »
Very cool new feature!

#1 needs an option to deal with CRLF differences with git.
My build.bat file has every line marked with !=, though nothing is different.
At one point it was ignoring newline characters, and then we changed it.  We will find something to do with this.

#2 A toolbar or keybindings to control live diff would be nice too.

There is a toggle for it on the Version control toolbar.  There are also commands that I have hesitated to make default bindings for.  They are:
  • svc_live_diff_next_difference - Go to the next Live Diff difference.  This currently only works if Show icons in margin is turned on.
  • svc_live_diff_prev_difference - Go to the previous Live Diff difference.  This currently only works if Show icons in margin is turned on.
  • toggle_svc_live_diff - Quickly turn Live Diff on and off for the current file.

I like to bind svc_live_diff_next_difference and svc_live_prev_difference to Ctrl+Alt+N and Ctrl+Alt+P, because it is similar to the short cut keys for the Next Diff and Prev Diff buttons on the diff dialog.
#3 I can edit the text in deleted lines.

#4 I can delete deleted lines with cut-line. (they reappear after refresh delay).

#5 I can select, but not copy text in deleted lines. Select and copy should be possible.

#6 If I delete a line, then select+copy several lines including the deleted line, the deleted line is included in the copied text. Probably shouldn't be? I dunno, having deleted text visible makes for some weird cases.

We're still not sure what to do about the deleted lines being editable.  We haven't found a clean way to change this yet.  I need to work on the copy issue.  There are cases where the user will want to copy deleted lines, and cases where they won't.  I'm sure we will tweak this.

Yes you can delete the deleted lines, but they come back.  It it is a little strange.

A: Is there a way to control the refresh delay?

Right now there is only a constant you can change and reload the module.  If you find shorter or longer time works better for you, please let us know.

B: A context menu for live diff to undo individual changes would be nice.
Hover over the != in the left margin should have a popup saying "live diff, line modified" or "live diff, line deleted.
There will be something like this in a future beta.

C: The + and - symbols for livediff are confusing with the syntax expansion +/- symbols being the same, but different colors.

We have a possible solution for this, but have not been able to implement it yet.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6680
  • Hero Points: 513
Re: Live diff
« Reply #2 on: August 02, 2022, 07:45:10 PM »
There is a bug regarding selecting and copying text from deleted lines (nosave lines). This is supposed to work for certain obvious cases but doesn't.  The deletes lines are editable and this is a current limitation. Not sure when or if we will make these nosave lines read-only.