Author Topic: Files of same name in old workspace remembered in "open" window new workspace  (Read 4918 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
I work with version control and I have several slightly different workspaces of my software project with small differences in the source files.

Lets say I have "source_rootA" and "source_rootB", which are the top level directories of my project.

And lets say I have a source file with same path and name in both workspaces:

source_rootA/source_file.c
source_rootB/source_file.c

If I have a workspace open for source_rootA, and I type "source_file.c" in the "Open" tool window, I will see source_rootA/source_file.c there.

However, when I then open a workspace for source_rootB, and I type "source_file.c" in the "open" tool window, I end up seeing BOTH source_rootA/source_file.c AND source_rootB/source_file.c in the "open" window, when I only want to see "source_rootB" there. I made sure my current directory is not source_rootA. I really don't want to have source_rootA/source_file.c there. I tried exiting SE and restarting it, but the source_rootA/source_file.c is still there.

Any way to tell SE to reset its memory of which files it remembers?



If I open


Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Do you still have source_rootA/source_file.c open in the editor ?

Also, check the options you have set for the Open tool window.
Tools > Options > File Options > Open > Open Tool Window.

In particular, Show/match open files and Show/match files in history.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
The file is not open in the editor.

In Tools > Options > File Options > Open > Open Tool Window

my settings are shown in the attached screenshot.

You can see that

Show/match files in history is "Off"
Show/match open files is "On"

But the file is not open in the editor, yet it is still listed in the "Open" window.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Also check the setting for "e/edit command Smart Open files in same directory". 

If that doesn't help, turn off the option to show/match open files and see if it makes any difference.  That, at least, will prove that SlickEdit thinks you do have the file open.

Maybe you do have the file open, but you just don't see it because you had done a zoom window or some other operation which took you out of strict one-file-per-window mode.  Look at the Files tool window (Buffers) and verify that it does not show the file as open.

Also check if the file is open in the Preview tool window or the References tool window.  These should be cleared out on workspace close, so if that is not happening for you, that is a bug.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
I do a File->Close all and see nothing in the Files tool window, and I still have the issue.

e/edit command Smart Open files in same directory is set to off

Indeed, after turning off the show/match open files, then the file from the old workspace is not listed, so SE thinks it has this file open.

I don't see the file in the preview or references window.

I exited SE and restarted it, and now the issue seems to be gone. But I have exited/restarted in the past and still had this issue.

I will let you know if it recurs again.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
I think the particular file that I was working on in the old workspace, I may have modified it earlier in SE but did not save it.

That could have possibly caused this situation. I will try doing this again when I have some time.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
It is happening to me again after changing to a new workspace.

This time, I did not have any files that I modified, and did not save.

See attached screenshot in "open" window.

Now when I turn off the show/match open files option, then the files from my old workspace stop showing up.

Then when I turn back on the show/match open files option, then the files from my old workspace are also no longer there either.

I feel I should not have to toggle the show/match open files when I switch workspaces.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Just happened to me again. But this time when I toggle the "show match open files" from on to off to on again, the undesired file still shows up.

But when I switch from on to off, the undesired file is not listed.

The undesired file in the old workspace is not open as far as I can see, I don't see it in the "Files" tool window or in any tab.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
I wonder if there are hidden buffers of your files. When you see the problem, trying setting the macro variable def_buflist to 23 and then invoke the "list-buffers" command from the SlickEdit command line. This will list all hidden buffer names. Set def_buflist back to 3 when your done (I think that's the default value).

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Reproduced this issue again, and I changed the def_buflist and ran list-buffers.

Screenshot is attached.

It shows that the other file should not be considered as "opened".

It does show many "Untitled", I don't know why. I typically open "Untitled" new windows, but then when I switch workspaces I don't save them. Don't know if this is related to the problem or not.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Don't know if this is related to the issue or not - I use clearcase from SE and check-out files often. Maybe when I did the check-out it put the file in some strange state?

Tim Kemp

  • Senior Community Member
  • Posts: 546
  • Hero Points: 92
I have seen this issue recently when I was making some new projects.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
I was able to reproduce this problem today.  It will be fixed in the next release.  Thanks for you patience debugging this problem.
« Last Edit: March 07, 2015, 01:19:50 AM by Dennis »