Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Nothing open in editor area after using Close Others #5313

Open
core-ai-bot opened this issue Aug 30, 2021 · 6 comments
Open

[CLOSED] Nothing open in editor area after using Close Others #5313

core-ai-bot opened this issue Aug 30, 2021 · 6 comments

Comments

@core-ai-bot
Copy link
Member

Issue by peterflynn
Friday Nov 01, 2013 at 00:22 GMT
Originally opened as adobe/brackets#5800


  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.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Nov 01, 2013 at 00:23 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Nov 01, 2013 at 00:46 GMT


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 bd4018d55 (PR #4590), so@JeffryBooher is the assignee winner for now...

@core-ai-bot
Copy link
Member Author

Comment by sathyamoorthi
Friday Nov 01, 2013 at 00:52 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Nov 01, 2013 at 01:34 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by sathyamoorthi
Friday Nov 01, 2013 at 01:44 GMT


@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);

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Wednesday Nov 13, 2013 at 01:48 GMT


open to@ingorichter per our meeting today

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

No branches or pull requests

1 participant