Author Topic: Context and Preview don't update  (Read 4107 times)

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Context and Preview don't update
« on: December 11, 2007, 06:34:44 pm »
SlickEdit 12.0.3 with the 12/11/2007 hotfix, WinXP sp2.

It is probably a setting I inadvertantly toggled off, but I can't find it...

When I move the cursor from one symbol to another, the Preview window no longer updates.  Similarly, when moving from one function to another (or even to a different file), the Context toolbar no longer updates to reflect current cursor location.

Thanks for any advice on how to fix whatever it is I broke...

(I just noticed that "Highlight matching..." isn't working, either, even though it is checked in Tools->Options->General->More...)

hs2

  • Senior Community Member
  • Posts: 2733
  • Hero Points: 285
Re: Context and Preview don't update
« Reply #1 on: December 11, 2007, 07:04:06 pm »
... sounds like you need to 'set-var _use_timers 1'
http://community.slickedit.com/index.php?topic=2217.msg9215#msg9215
HS2

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4536
  • Hero Points: 349
Re: Context and Preview don't update
« Reply #2 on: December 11, 2007, 10:03:52 pm »
You may need to exit and restart.  Sounds like the timer died.  This happens if a Slick-C stack happens during a timer event (otherwise, you'd probably get infinite stacks).

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Context and Preview don't update
« Reply #3 on: December 11, 2007, 11:12:49 pm »
Thanks for the pointer to the solution and a possible explanation.

If I understand Clark's response, a Slick-C stack dump disables the timer(s)? 

I can think of two events prior to the turning off of the "Highlight matching..." and Preview update features:
a) installing the 12.10.2007 hotfix;
b) trying to hook up AccuRev with a workspace, and getting a Slick-C stack dump.  (Happens every time I try to connect a workspace with AccuRev version control.)

Do either of those things explain why _use_timers was set to 0?


hs2

  • Senior Community Member
  • Posts: 2733
  • Hero Points: 285
Re: Context and Preview don't update
« Reply #4 on: December 11, 2007, 11:27:23 pm »
There was a hint from Dennis time ago - http://community.slickedit.com/index.php?topic=833.msg4337#msg4337
Quote
In rare cases, if you get a Slick-C stack at exactly the wrong time, _use_timers can get reset.
So it seems that the AccuRev stack-dump was exactly at the wrong time ...
HS2

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4536
  • Hero Points: 349
Re: Context and Preview don't update
« Reply #5 on: February 08, 2008, 07:45:57 pm »
My post about Slick-C stack killing timers is misleading.  Let me explain further.  If Slick-C code handling a timer event causes a Slick-C stack, the timer is automatically stopped from repeatedly calling the same Slick-C code.  This does not change the value of _use_timers which is a Slick-C variable.  Restarting the editor will allow the timer to be started again.  However, if some other mechanism causes _use_timers to be set to 0, restarting the editor won't help.  Set the _use_timers back to 1 and restart the editor.

I think there are some macros which temporarily turn off _use_timers and then reenable it.  If one of these macros got a Slick-C stack before being able to set it back, then you would see this problem.

hs2

  • Senior Community Member
  • Posts: 2733
  • Hero Points: 285
Re: Context and Preview don't update
« Reply #6 on: February 08, 2008, 09:29:23 pm »
Thanks for the clarification Clark. Good to know. HS2