Author Topic: Undo doesn't work after diff  (Read 7421 times)

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4481
  • Hero Points: 344
Re: Undo doesn't work after diff
« Reply #60 on: September 14, 2017, 10:04:28 pm »
OK, well please put it on the wish list for further optimizations. I use this exactly for the reason that I don't want to run the compare tool twice, and BC handles it well. Hopefully DZ can handle this in a future revision.

Sorry everyone. I goofed badly with my post. multi-file find can ALREADY do exactly what this user wants. You must turn off recursive. Here's how to get the job done doing a multi-file find.

Look in:  c:\    -- Yep this is what I tested
File types: temp\**\junk.txt    -- probably want something like * or *.cpp here.
uncheck "Look in subfolders" and "Look in zip/word/excel files".

I tried doing something similar with DZ and it almost worked. The problem is the result tree is obviously confused as to where files are. It did reduce the search time but well...didn't work right though. Nothing needs to be optimized. DZ needs to be fixed to support this.

NOTE:  Here's where I went wrong with my thoughts in my previous post on this. For a recursive search, when you specify "path1\**\*.txt" it is converted to "**\path1\**\*.txt". It's supposed to do that. Because of this intent it CANT be optimized the way I was thinking. When you specify a non-recursive search, no "**\" is prepended to the front. HOWEVER, "path1\**\*.txt" still specifies a recursive search.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #61 on: September 15, 2017, 02:06:04 pm »
Clark: This is working for me, thanks! Not intuitive to not use recursive though - even for you who is probably the biggest expert on SE!

Now that I'm in the directory tree, I'm missing the "Expand All" and "Collapse All" buttons that BC gives me to entirely collapse or expand the directory tree.

Also, being able to update the exclusions while the tree is showing - I'm really missing this. BC has 2 different kinds of "refresh" - a "fast" refresh where it updates the files "in place" - so I think it means if you add an exclusion that instead of rescanning the whole tree it deals with what it already has, and non-fast refresh that rescans everything again. You may want to consider adding this to DZ.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2171
  • Hero Points: 114
Re: Undo doesn't work after diff
« Reply #62 on: September 15, 2017, 02:09:13 pm »
Right click on the part of what you want to collapse and choose "Hide".

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #63 on: September 15, 2017, 02:15:27 pm »
A few other things.

I tried using "goto-parent" command and got error "Command 'goto-parent' currently not allowed in Diff mode. I have a huge switch/case statement and I wanted to quickly go to the enclosing "switch", so would have been nice to have this - it would have been something BC could not do!

Then I thought maybe I could have the file opened in SE at the correct line so I could run "goto-parent", so I right clicked and saw "Edit file(will close this dialog)" - but I'd rather not the dialog was closed. Now I did run vsdiff from the command line while SE was already running, but maybe a way to see the file in SE while running vsdiff would be nice.

I haven't tried scanning my full tree yet, just a few subdirs, the full one requires 12 minutes from BC (as it is remote file system), probably will take as long with DZ. But at least with BC it updates the tree as it goes along, within the first minute I'll see some of the files that have diffs, and I can be reviewing those while the rest of the files are scanned. Would be great if DZ can do this. You can see a demo of this towards the last half of the video I previously uploaded to support.slickedit.com under "bc_vs_dz_folder_compare_performance.txt". BC also prints out the amount of time it took to scan the whole tree, but I don't see this info in the "Report" button on DZ tree comparison.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #64 on: September 15, 2017, 02:17:43 pm »
Just tried this "hide", but not doing what I want. "Expand all" will expand every level of the tree in BC, and collapse all collapses every level. Hide is not doing this.

While I was looking at the diff of one file in the tree, I wanted to see a second file, but the window with the tree was gone. In BC I can have multiple tabs, one showing the tree and another showing the file I'm diffing. So if I want to see a second file, I can go back to the tab with the directory tree and click on a second file. With DZ it looks like I can look at only 1 diff at a time.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2171
  • Hero Points: 114
Re: Undo doesn't work after diff
« Reply #65 on: September 15, 2017, 02:18:44 pm »
I can put goto-parent in the allowed diff commands for you.  It's a little trickier than it sounds, because you have to get the undo right.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #66 on: September 15, 2017, 02:19:25 pm »
In addition to tabs, DZ also allows to use different windows, or to keep in tabs. I can right click on a tab and choose "Move tab to new window". Not sure if BC allows me to put a window back into another window's tab though.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #67 on: September 15, 2017, 02:24:41 pm »
Thanks about "goto-parent". Another one that would be useful but is also not allowed is: "context-prev-tag" which I use in order to see the enclosing function.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2171
  • Hero Points: 114
Re: Undo doesn't work after diff
« Reply #68 on: September 15, 2017, 02:27:18 pm »
Thanks about "goto-parent". Another one that would be useful but is also not allowed is: "context-prev-tag" which I use in order to see the enclosing function.

It's right above the window.

If I forget about goto-parent in remind me.  It can be added in a hotfix.  You have to balance the undo steps, but it's all macro work.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #69 on: September 15, 2017, 02:37:09 pm »
Above the window for me it states "no current context".

Now I ran vsdiff from the command line and not from SE, don't know if this makes a difference or not.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #70 on: September 15, 2017, 02:40:01 pm »
copy-buf-name would also be useful. I just tried to use it to copy/paste the full path to the file on the left, so I could run DZ from inside SE if that would make a difference, but it said 'copy-buf-name' not allowed in diff mode.

Others:
buf-dir-to-clipboard

Additionally, how to type a command into DZ? I was using keybindings to run my commands, but you took over Alt-N (which I use to copy/paste the name portion of a file), so I wanted to run my command manually but if I press "esc" it closes the DZ window.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2171
  • Hero Points: 114
Re: Undo doesn't work after diff
« Reply #71 on: September 15, 2017, 02:43:19 pm »
Why don't you PM me a list of commands?  Some I can do, some I won't be able to.  I also probably can't get them all into 22.0.0, but like I said they're things that can go into hotfixes, so they won't have to wait for a major release.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2171
  • Hero Points: 114
Re: Undo doesn't work after diff
« Reply #72 on: September 15, 2017, 02:44:48 pm »
Above the window for me it states "no current context".

Now I ran vsdiff from the command line and not from SE, don't know if this makes a difference or not.

This is broken if you run vsdiff from the command line.  I don't know why.  It works from the editor, but all the tagging engine is still there.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #73 on: September 15, 2017, 02:48:29 pm »
Hard to know all the macros that I'll need, but attached is my macros file.

My key bindings are assigned in the "custom-init" function.

These functions I use often that could be useful in a diff window:

   custom_bind_key("context-prev-tag","C-A-F");
   custom_bind_key("goto-parent","C-A-P");
   custom_bind_key("softwrap-toggle","A-W");
   custom_bind_key("copy-buf-name","A-Q");
   custom_bind_key("buf-dir-to-clipboard","A-D");
   custom_bind_key("copy-buf-name-only","A-N");
   custom_bind_key("inc-font","C-A-0");
   custom_bind_key("dec-font","C-A-9");
   custom_bind_key("rdef-font","C-A-8");
   custom_bind_key("rdef2-font","C-A-7");
   custom_bind_key("rSelectDisplay","C-A-S");

custom_bind_key will bind a function to a key. Some of these functions are direct SE macros, but others are my own custom macros that you can dig into in my .e file.

rowbearto

  • Senior Community Member
  • Posts: 1167
  • Hero Points: 73
Re: Undo doesn't work after diff
« Reply #74 on: September 15, 2017, 03:09:17 pm »
Quote
While I was looking at the diff of one file in the tree, I wanted to see a second file, but the window with the tree was gone. In BC I can have multiple tabs, one showing the tree and another showing the file I'm diffing. So if I want to see a second file, I can go back to the tab with the directory tree and click on a second file. With DZ it looks like I can look at only 1 diff at a time.

If I launch the diff from SE instead of the command line, then I can have multiple windows (but tabs would be a nice wish).

Quote
Above the window for me it states "no current context".

Now I ran vsdiff from the command line and not from SE, don't know if this makes a difference or not.
Quote
This is broken if you run vsdiff from the command line.  I don't know why.  It works from the editor, but all the tagging engine is still there.

Confirmed, I do see the context if I launch from SE itself. Lesson learned.