Author Topic: spurious dialog  (Read 3398 times)

Graeme

  • Senior Community Member
  • Posts: 2702
  • Hero Points: 336
spurious dialog
« on: September 14, 2019, 12:50:25 pm »
I'm browsing the diff.e source file and with the cursor on the word diff (actually in a comment) I use ctrl-dot because I want to go to that function, slick pops up a dialog (attached) about the file not being writeable  - but I wasn't trying to write to it.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3528
  • Hero Points: 471
Re: spurious dialog
« Reply #1 on: September 16, 2019, 03:02:33 pm »
Can you reproduce this with a default configuration?  Do you have Ctrl+. bound to something other than push-tag ?

Graeme

  • Senior Community Member
  • Posts: 2702
  • Hero Points: 336
Re: spurious dialog
« Reply #2 on: September 16, 2019, 09:43:02 pm »
Ah, good question.  Yikes, I have a macro for it - I forgot all about it.  My macro is supposed to bring up the preview window if it's not already visible, otherwise do push-tag.  I do a save first because push-tag seems to not work so well when the file is un-saved.  I must remember to test in a default config first...

Code: [Select]
_command void preview_push_tag() name_info(TAG_ARG','VSARG2_MARK|VSARG2_REQUIRES_EDITORCTL|VSARG2_REQUIRES_MDI|VSARG2_READ_ONLY)
{
   save();
   int wid = tw_find_form('_tbtagwin_form');
   if ( wid > 0 && tw_is_auto(wid) ) {
       push_tag();
       return;
   }
   if ( wid <= 0 || !tw_is_wid_active(wid) ) {
      show_preview();
      return;
   }
   push_tag();
}


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6209
  • Hero Points: 482
Re: spurious dialog
« Reply #3 on: September 16, 2019, 11:37:03 pm »
Just check if the file_exists() and/or is modified (p_modify) before calling save.