Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Nothing open in editor area after using Close Others #5800

Closed
peterflynn opened this issue Nov 1, 2013 · 6 comments
Closed

Nothing open in editor area after using Close Others #5800

peterflynn opened this issue Nov 1, 2013 · 6 comments
Assignees
Milestone

Comments

@peterflynn
Copy link
Member

  1. Open a few files into the working set
  2. Select one in the middle
  3. Close Others, Close Others Above, or Close Others Below

Result:
The correct files are closed, but the editor area is cleared and nothing is selected in the working set (even if there are still items in it).

Expected:
File you right-clicked is still selected in working set and displayed in editor area.

Workaround:
Click the file again. The original editor comes back and no changes, state, etc. are lost.

@peterflynn
Copy link
Member Author

This may have been working originally and then broken by some of the Image-close work... but if so, it's a good example of why features like this should have unit tests before landing.

@peterflynn
Copy link
Member Author

I think this is caused by this line:

DocumentManager.removeListFromWorkingSet(savedFiles, (clearCurrentDoc || true));

Notice how the 2nd arg is forced to always be true. I think we would only want it to be true when the current document isn't in the working set.

Looks like that change was made by @sathyamoorthi in bd4018d (PR #4590), so @JeffryBooher is the assignee winner for now...

@ghost ghost assigned JeffryBooher Nov 1, 2013
@sathyamoorthi
Copy link
Contributor

@peterflynn yes. I noticed and gave pull request for that a long ago. :) #5497.

@peterflynn
Copy link
Member Author

Ok, marking 'fix in progress.' Sorry it didn't get merged during the same sprint...

@sathyamoorthi
Copy link
Contributor

@peterflynn sure. np.

That was a clear mistake made by me. I didn't manually check before i did my last commit on that PR. I ran "Close Others" unit test and did a commit. Later, i realized that issue and added below line in unit test file. So you can rely that test file now. :)

expect(DocumentManager.getCurrentDocument()).not.toBe(null);

@JeffryBooher
Copy link
Contributor

open to @ingorichter per our meeting today

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants