Author Topic: V18 Ctrl-Tab window order totally hosed.  (Read 20334 times)

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 798
  • Hero Points: 54
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #15 on: August 22, 2013, 11:40:07 PM »
Well that's strange since that issue is exactly what I thought I fixed. Make sure you have "Smart next window" set for your Smart next window style under Options>Editing>Editor Windows. Are you sure you have the modified macro loaded?

++rodney

WadeHatler

  • Community Member
  • Posts: 19
  • Hero Points: 0
  • Been using VSlick since the dawn of time
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #16 on: August 23, 2013, 10:37:35 PM »
I made sure I have 'Smart next window' enabled, and also 'New files on right'

To test:
  • I Edit File1, File2, File3, File4 in sequence.
  • 4 Tabs open left to right as expected
  • Edit window.e which becomes the fifth window
  • Make suggested change and add some say() statements to be sure it's working.  Load and run.
  • Ctrl-Tab flips between File4 and Window.e as expected
  • With window.e selected, hold Ctrl and cycle to File1
  • Ctrl-Tab now switches between File1 and window.e as expected
  • From File 1, hold Ctrl and navigate to File 3 and release Ctrl.  Now Ctrl-Tab goes between File1 and File 3 as expected
  • With the mouse, select File1 and then File4.  Ctrl-Tab now toggles between File1 and File4 as expected
  • With File1 selected, open a new file from the commandline.  It opens in the right tab as expected.
  • Ctrl-Tab now toggles between File4 and the new file, rather than File1
  • Verified the new code is in place and executing when the new window is loading (via say)
  • Opened a new window from a bookmark.  It works as expected.
  • Opened a new window via the e command.  It works as expected.
  • Opened a new window via Ctrl-O and it works as expected

This might explain why you don't have hordes in the street with pitchforks.     The only use case that doesn't work is when you open a new file via the command line. Unfortunately, that's  how I open about 90% of my files (I do it with hotkeys).  It's probably an atypical usage patterns and most users probably didn't even notice the problem.

Now that I understand the problem I can probably make a hacky temporary solution involving calling vs with the -#e switch that will at least work for files without spaces.  You can't quote the filename right for files with spaces though, so I'd need some other hack.  I'm hoping that I can just wait til tomorrow and you'll have it all figured out anyway.

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 798
  • Hero Points: 54
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #17 on: August 24, 2013, 03:34:20 PM »
Could not reproduce on Windows.

Make sure your say() window is not popping up in the middle of all this. All bets are off if focus is switching to the say() window while Ctrl+Tabbing around.

Also: Are you using any third-party tools/window managers that would mess with application focus (e.g. WindowBlinds, etc.)?
« Last Edit: August 24, 2013, 04:37:55 PM by Rodney »

WadeHatler

  • Community Member
  • Posts: 19
  • Hero Points: 0
  • Been using VSlick since the dawn of time
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #18 on: August 26, 2013, 06:43:05 PM »
It does it with and without the SAY statements.  I'm not really doing anything funny with focus, not that it should matter.  I have a _switchbuf that sets some options whenever I enter a window, but it doesn't do anything funny with windows.

Just to prove the issue, I did the following:
1. Renamed my 18.8.0 Config directory
2. Restarted VSlick and accepted all defaults so I have a new clean install
3. Verified that the Smart tabs are enabled
4. From a DOS Prompt, Execute
     VS File1
     VS File2

5. Now I have 2 tabs as expected and Ctrl-Tab switches between the two
4. Close all tabs and return to DOS and execute
     VS File1
     VS File2
     VS File3

Each time I'm just Alt-Tabbing back to the command prompt to execute the command.
When it's done, Ctrl-Tab switches between File1 and File 3, instead of File2 and File 3 as expected (and as all previous VSlicks did, and as all other editors do).

5. I wrote a batch file that opens File1, File2, File3 in that order with a 1 second delay between, so I never change focus.  That does the same behavior.

I think this shows it's clearly broken.



Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 798
  • Hero Points: 54
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #19 on: August 26, 2013, 07:18:17 PM »
I only see the behavior you describe if I do *not* have the window.e fix loaded. Do you have the window.e fix loaded?

++rodney

WadeHatler

  • Community Member
  • Posts: 19
  • Hero Points: 0
  • Been using VSlick since the dawn of time
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #20 on: August 26, 2013, 11:10:34 PM »
I do but just to be double-sure, can you paste the actual fixed file so we're sure we're using the same thing.  Use w zero 2 at wademan.com

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 798
  • Hero Points: 54
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #21 on: August 27, 2013, 02:31:39 PM »
You can download it from the following:
http://support.slickedit.com/outbound/wademan/window.e

++rodney

WadeHatler

  • Community Member
  • Posts: 19
  • Hero Points: 0
  • Been using VSlick since the dawn of time
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #22 on: August 27, 2013, 03:33:56 PM »
That does the job.  Guess I didn't apply the patch right. Thanks Rodney. 

dholshou

  • Community Member
  • Posts: 51
  • Hero Points: 1
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #23 on: October 21, 2013, 06:40:37 PM »
Agreed. The patch helped a little.
For years, every now and then, VSE would offer up a random window on <ctrl><tab>. Sometimes this would be a file I haven't accessed in a VERY LONG time. It usually happened when cycling through the "file queue." I like to keep every file in my entire project open all the time. Sorry, that's just me. That means when I open file, I'll select a whole directory in the open dialog and never actually view that file. Sometimes the file presented when using multiple <ctrl><tab> hits (hold <ctrl> and multiple press <tab>) would be something I hadn't touched... maybe ever.
With the v18 upgrade, I now get random files every time I <ctrl><tab>.
I applied your patch and it helped a bit. As long as I only expect 1 file in history in the file queue, it's ok. Multiple hits and anything could happen.

dholshou

  • Community Member
  • Posts: 51
  • Hero Points: 1
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #24 on: October 21, 2013, 06:50:39 PM »
Seems to me the rules should be simple for Smart Next Window, and maybe I'm just using the wrong value. If I view, modify, or even smell a file it should be pushed onto the front of the queue (and removed from its previous location.)

If I <ctrl><tab> I should get the last viewed/modified file.
If I <ctrl><tab><tab> I should get the one previous to that.
etc. and onward into infinity, in a circular method around the queue eventually coming back to the front.
Is this 'not' Smart Next Window? Am I just misunderstanding the rules?

This definitely isn't either of "Reorder Windows" or "No window reordering."

On this rule-set it seems any and every type of access should do this push to the queue: <ctrl>. <ctrl><shift>f <ctrl>, open drag-n-drop not-matter-what
The only question, to me, is whether to remove a file from the queue if it gets closed.

Currently, this is not what I know as Smart Next Window. What should I be using?
« Last Edit: October 21, 2013, 08:23:57 PM by dholshou »

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #25 on: October 22, 2013, 03:02:50 AM »
That's what I want, too.  I started to try to write that support as a standalone macro a couple years ago (the request isn't a new one), but I don't have as much time for writing macros as I used to, and I didn't get very far.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #26 on: October 22, 2013, 11:37:14 AM »
Seems to me the rules should be simple for Smart Next Window, and maybe I'm just using the wrong value. If I view, modify, or even smell a file it should be pushed onto the front of the queue (and removed from its previous location.)

I'm not certain I understand you but my xretrace macro
http://community.slickedit.com/index.php/topic,4693.0.html
lets you retrace your steps according to where the cursor has been, but it also lets you retrace by "skipping" to the next buffer, which is probably not exactly what you want because you're likely to still visit the same buffer more than once.  However, I do have another macro that I haven't tested on slick V18 that lets you "retrace" without re-visiting a buffer.  I'll try and test on V18.  It actually saves the visited buffer list per project on disk, if you configure it to.


Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #27 on: October 23, 2013, 08:08:22 AM »
I posted a new macro in the user-macros folder - it's a small amount of code that uses _switchbuf to keep track of the buffers visited.  Instead of using _switchbuf it would be possible/easy to use the timer callback in my xretrace macro to detect when the current buffer has changed and maintain the list.  I might add that to xretrace one of these days.

WadeHatler

  • Community Member
  • Posts: 19
  • Hero Points: 0
  • Been using VSlick since the dawn of time
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #28 on: December 23, 2013, 08:33:47 PM »
It looks like this fix didn't make it into 18.0.1.  I just installed it, and it reverted to the broken behavior.  I fixed it by loading Rodney's hot fix over the file in the default VSlick\Macros folder (http://support.slickedit.com/outbound/wademan/window.e), after verifying that the only differences were Rodney's missing hotfix.

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 798
  • Hero Points: 54
Re: V18 Ctrl-Tab window order totally hosed.
« Reply #29 on: December 23, 2013, 09:44:49 PM »
I have verified that the fix is definitely in there. You can test this by launching the editor with a clean config.

++rodney