Author Topic: 14.0.2.2: _DiffModal repeates diff() after search because...  (Read 2443 times)

os2bird

  • Community Member
  • Posts: 94
  • Hero Points: 11
Hi again.

If you search in a diff view using Ctrl-F or by pressing the "Find..." button, the diff will be repated by _DiffModal() in diff.e because diff_find/gui_find_modal will put the the search expression in _param1 which confuses _DiffModal which is I think is assuming only ctltypetoggle.lbutton_up is setting magic stuff in _param1 ("line" or "code"). This bug has been around since 14.0.0.7 from what I've observed. (Trick: Search for "code" and the next diff view will be a code diff.)

One workaround would be to save upon entry to diff_find() and restore it again upon return. But this probably doesn't address the real problem here, so I leave it to you to come up with a cooler fix. :)

Kind Regards,
 knut

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: 14.0.2.2: _DiffModal repeates diff() after search because...
« Reply #1 on: July 23, 2009, 02:22:58 pm »
I haven't been able to reproduce this problem. Here's what I did:
1) Select Tools File Difference.
2) I pick 2 files to compare and click OK.
3) In the diff view I click the Find button or press Ctrl+F to open the Find dialog.
4) I tried search for "code" and a variety of other words.
5) When I click OK, SlickEdit closes the Find dialog and highlights the next instance of the word I have searched for.

Can you indicate what you might be doing differently or what the specific observed result is? When you say the "diff will be repeated", what do you see happen? Does the original Diff window close and then get reopened?

os2bird

  • Community Member
  • Posts: 94
  • Hero Points: 11
Re: 14.0.2.2: _DiffModal repeates diff() after search because...
« Reply #2 on: July 23, 2009, 02:58:07 pm »
Here's what normally do when hitting this bug:
1) Right-click and select "History for <file>" from the "Version Control" menu (subversion).
2) Then select some older revision and hit the "Diff..." button.
3) In the diff view do Ctrl+F and enter "asdf".
4) Dismisses the "String not found" message box.
5) Press Esc to exit the diff view.
6) Diff view pops up again (after showing gauge).
7) Goto 3 if you want to repeat the exercise.

The problem does not occur when diffing using Ctrl-= as it is normally bound to diff() and won't be involving _DiffModal in any way that I can spot. And yes, it is a new diff window.

Kind Regards,
 knut

os2bird

  • Community Member
  • Posts: 94
  • Hero Points: 11
Re: 14.0.2.2: _DiffModal repeates diff() after search because...
« Reply #3 on: July 24, 2009, 08:11:12 pm »
Tried the hotfix from 2009-07-23: the "Find" button works now, but Ctrl-F still produces the issue like before. Guess is because the hot fix only saves and restores _param1 in _ctlfind.lbutton_up() and diff_find(...) which Ctrl-F seems to map to (DiffCommands[gui_find]) is unchanged. (There are a few other functions ending up in diff_find.)

Kind Regards,
 knut