Author Topic: Strange Window reordering mode  (Read 7843 times)

RA

  • Community Member
  • Posts: 23
  • Hero Points: 0
Strange Window reordering mode
« on: February 19, 2008, 09:43:05 am »
Is there anyone that have made a macro or something that makes SE work like Visual Studio when reordering open windows ?

If find the "Smart window reordering" unusable in some situations, for example this:

1. Open two files, called A and B, and work a bit with them.
2. Open a third file called C, when A is active
3. Switch back from C to A to check something
4. Try to switch back from A to C , this makes the editor open B

Graeme

  • Senior Community Member
  • Posts: 2279
  • Hero Points: 296
Re: Strange Window reordering mode
« Reply #1 on: February 19, 2008, 11:07:56 am »
You could read this thread
http://community.slickedit.com/index.php?topic=2573.0

I assume you're using next-window in all four steps?  Using slick V12 with "one file per window" selected in general options and "smart next window" enabled, I don't get the behaviour you describe.  What version of slick are you using?

Whether step 4 gets you back to window C might depend on how you switched from C to A in step 3 or on how you opened file C in step 2 -  can you describe exactly what you do in more detail?  Can you check what you see on the Window menu MRU list - window 1 should be the window currently active and window 2 should be the previous window that was active.

Did you know that holding down the control key when using smart next window makes a difference - the navigation topic in the help should mention this but doesn't.  It's described under the "smart next window" config option though.

Graeme

RA

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Strange Window reordering mode
« Reply #2 on: February 19, 2008, 11:44:57 am »
Quote
I assume you're using next-window in all four steps?  Using slick V12 with "one file per window" selected in general options and "smart next window" enabled, I don't get the behaviour you describe.  What version of slick are you using?

I use v12 and have both "Smart next window" och "one file per window" checked.

Quote
Whether step 4 gets you back to window C might depend on how you switched from C to A in step 3 or on how you opened file C in step 2 -  can you describe exactly what you do in more detail?


Hope this explains it better, if you imagen all windows opened in SE in a stack, like this, where the current file is at the top of the stack

A <---- current window
B <---- next window

If you open a new file, C, its put atop of the stack

C <----- current window
A <---- next window
B

if I now press CTRL+TAB with smart reorder enabled, the stack is reordered like this, so next time I press CTRL+TAB I get window B (at least is this what I think happens)

A <----- current window
B <---- next window
C

If it had been Visual studio the stack would have looked like this, which would have made it possible to get back to file C with CTRL+TAB

A <----- current window
C <---- next window
B

Graeme

  • Senior Community Member
  • Posts: 2279
  • Hero Points: 296
Re: Strange Window reordering mode
« Reply #3 on: February 19, 2008, 12:04:14 pm »

A <---- current window
B <---- next window

If you open a new file, C, its put atop of the stack

C <----- current window
A <---- next window
B

if I now press CTRL+TAB with smart reorder enabled, the stack is reordered like this, so next time I press CTRL+TAB I get window B (at least is this what I think happens)

A <----- current window
B <---- next window
C

If it had been Visual studio the stack would have looked like this, which would have made it possible to get back to file C with CTRL+TAB

A <----- current window
C <---- next window
B

If you click "Window" on the main menu, slick will show you the "stack" as I mentioned before  - did you check that and does it actually show A B C as you write above? 

Can you describe exactly how you open the new file  - e.g. do you use the file open dialog or File menu recent files list or a project file list or a bookmark or what?

Graeme

Graeme

  • Senior Community Member
  • Posts: 2279
  • Hero Points: 296
Re: Strange Window reordering mode
« Reply #4 on: February 19, 2008, 12:26:09 pm »
If I open the file using the file open dialog I can reproduce your problem.  It looks like a bug to me because the behaviour is erratic and sometimes it actually ends up with the same file as number one and number 2 in the window list so that Ctrl TAB doesn't switch files at all.

If you're really keen, you could download the GFileman toolbar code I wrote that keeps it's own history of windows visited - the zip files are here.
http://community.slickedit.com/index.php?topic=2222.0

I use my own window history instead of smart next window.  The code in the zip files also includes a "goback" mechanism to go back to the last line you were at as well as go back to the last file.

Graeme

RA

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Strange Window reordering mode
« Reply #5 on: February 19, 2008, 01:26:56 pm »
Quote
If you click "Window" on the main menu, slick will show you the "stack" as I mentioned before  - did you check that and does it actually show A B C as you write above?


Yes, it shows as I wrote.

Quote
If I open the file using the file open dialog I can reproduce your problem.  It looks like a bug to me because the behaviour is erratic and sometimes it actually ends up with the same file as number one and number 2 in the window list so that Ctrl TAB doesn't switch files at all.

I have to agree, while I tried to explain my problem, I sometimes found myself thinking "what happned now !?" when switching between files.

Quote
I use my own window history instead of smart next window.  The code in the zip files also includes a "goback" mechanism to go back to the last line you were at as well as go back to the last file.

Thank you very much, but I will submit this as a bug report, this is stuff that should be working out of the box, or at least be documented in a way that I can predict how it works.

jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
Re: Strange Window reordering mode
« Reply #6 on: February 19, 2008, 04:46:36 pm »
I've never noticed this behavior, and when I try your steps I get the correct behavior. I've been using mostly Linux for the last six months, but previously I used SE on Windows, with the "Windows 3.1" style Open dialog.

As mentioned on the previous thread, I have noticed that when you open multiple files at once, one of them becomes the current window and the rest are placed at the bottom of the stack, which is not what I would expect. I had to train myself to use Ctrl+Shift+Tab to get to those other buffers in that scenario, but at least it always works consistently for me.

Regards

John Hurst
Wellington, New Zealand

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2618
  • Hero Points: 402
Re: Strange Window reordering mode
« Reply #7 on: February 20, 2008, 10:16:42 pm »
@Graeme -- Can you provide steps to get it into the "same file as number one and number 2 in the window list" situation?

@RA 
   * Can you clarify whether you have seen the "same file" problem Graeme mentions? 
   * Or are you just reporting the inconsistency with Visual Studio
     (which I can not reproduce)? 
   * What emulation are you using?
   * Are you using the standard open file dialog?
      or the Windows 3.1 style open file dialog?
      or opening files using the "e" command from the command line?

jbhurst -- You might prefer turning on "Edit 'A B C' start on file A
                       in the file load options.

If can consistently reproduce either issue, you *could* turn on macro recording, then try to reproduce the issue, then send the resulting macro into support, which would have a trace of all the commands you really did to get into that state.

RA

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Strange Window reordering mode
« Reply #8 on: February 21, 2008, 11:02:20 am »
@Dennis
Quote
* Can you clarify whether you have seen the "same file" problem Graeme mentions?


No, I've never seen the "same file" problem"

Quote
* Or are you just reporting the inconsistency with Visual Studio
Its not an inconsistency with Visual Studio IMO, its an inconsistency how it should work decribed by the SE documentation.

When I press CTRL+TAB (bound to next-window) I expect SE to cycle trough the two windows at the top of the stack, if I open a new Window that window should be place at the top of the stack. This is working sometimes, but there is an inconsistency to this, its almost as if I wait with switching windows after open a new file, it works like intended, but if I'm quick, it places the newly opened Window on position 3 in the stack after pressing CTRL+TAB.

Quote
* Are you using the standard open file dialog?
I'm using the standard file open dialog.

Quote
If can consistently reproduce either issue, you *could* turn on macro recording

Will try this!

Graeme

  • Senior Community Member
  • Posts: 2279
  • Hero Points: 296
Re: Strange Window reordering mode
« Reply #9 on: February 21, 2008, 11:29:24 am »
Dennis,

I just spent half an hour trying to reproduce this using the "file open" button on the standard toolbar to open the file but wasn't able to.  Then for some reason I tried using Ctrl O (bound to gui-open) to open the file (instead of the toolbar button), and the window list does go wrong when Ctrl O is used, but not in either of the ways I posted about yesterday.  It's easily reproducible as follows

1. create brand new SE 2007 12.0.3.0 config folder using -sc option (i.e. no hotfixes)
2. leave all settings as default
3. open files f1, f2, f3
4. use next-window so as to get alternation between files f1, f2 when next-window is used.
5. With file f1 active, use Ctrl O to open file f4 - window list shows f4, f1, f2, f3
6. Press Ctrl tab once. File f1 opens and window list shows f1, f4, f2, f3
7. Press Ctrl tab once more,  File f2 becomes current when it should have been file f4.

You should be able to reproduce it in any config folder that has one file per window and smart next window enabled  (plus I have the Edit A,B,C thing unchecked as default options do).  I don't know if this is related to the problem I reported yesterday.

In the config folder I was using yesterday, my window list is actually showing three windows with the same file i.e. the same name shows 3 times in the window list - the file tabs show only one of these names.  I don't know how to reproduce this right now but I'll keep an eye on it.

I also noticed another slight inconsistency as follows.

If you have say 5 files open and the window list shows f1, f2, f3, f4, f5 with next-window alternating f1, f2, f1, f2...  then with file f1 current, press ctrl tab twice without releasing the ctrl key  - now f3 is the current window but the window list shows f3, f2, f1, f4, f5  i.e. f1 and f3 have swapped places in the window list.  Since file f2 is now shown as second in the window list, you might expect that next-window would go to file f2 next  - but it goes back to f1 as it should, because that was the file that was last viewed.

Graeme

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4640
  • Hero Points: 371
Re: Strange Window reordering mode
« Reply #10 on: February 21, 2008, 02:57:06 pm »
I have reproduced the bug above.  If I use the "e f4" command from the command line, this works.  Using Ctrl+O to open the file seems to be the difference.  I will look into this.

Thanks for the test case.  At first I couldn't reproduce anything.  Then I tried again yesterday and seemed to hit a bug but I couldn't figure what I did.

Graeme

  • Senior Community Member
  • Posts: 2279
  • Hero Points: 296
Re: Strange Window reordering mode
« Reply #11 on: February 23, 2008, 01:38:41 pm »
I decided to try this again coz I was frustrated at not being able to reproduce the original problem after being able to a couple of days ago  -  right now I can consistently reproduce the original problem reported by RA  i.e. with files f1 f2 f3 open and next-window alternating between f1 and f2 and f1 active, open file f4 using Ctrl O  - next-window/Ctrl-tab then goes to f1 and pressing Ctrl-tab again goes to f2 when it should have been f4. 

Right now this is happening consistently with the "brand new" config folder I mentioned previously as current config (all default options) and also in my normal SE 2007 config folder.  Mostly likely if I try it again tomorrow I won't be able to reproduce it again.  It seems strange that I can reproduce it easily now, with two different config folders but couldn't yesterday.  Makes me wonder if the problem is in Windows (XP SP2) and not SE.

Graeme

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2618
  • Hero Points: 402
Re: Strange Window reordering mode
« Reply #12 on: February 25, 2008, 03:29:05 pm »
Just a quick note for Graeme so you can stop stressing over this one, Clark found the problem and there will be a fix for it in the second beta.

RA

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Strange Window reordering mode
« Reply #13 on: February 26, 2008, 03:34:38 pm »
Are you planing to release a bug fix for SE 2007 as well ?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2618
  • Hero Points: 402
Re: Strange Window reordering mode
« Reply #14 on: February 26, 2008, 08:36:49 pm »
No to the hot fix, since the fix spans several files and the problem is easily worked around and does not prevent you for getting things done.