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

Go to the most recently visited file when closing a file #2122

Merged
merged 5 commits into from
Dec 6, 2012
Merged

Go to the most recently visited file when closing a file #2122

merged 5 commits into from
Dec 6, 2012

Conversation

TomMalbran
Copy link
Contributor

This would add what was suggested in #2091

@ghost ghost assigned peterflynn Nov 15, 2012
@ghost ghost assigned redmunds Dec 5, 2012
@redmunds
Copy link
Contributor

redmunds commented Dec 6, 2012

This works great, but it seems to duplicate the logic that's already in the getNextPrevFile() function. Can you just call that function instead?

@redmunds
Copy link
Contributor

redmunds commented Dec 6, 2012

Done with initial review.

@TomMalbran
Copy link
Contributor Author

Done. Totally missed that function there. Had to move it up to use it just to pass JSLint.

@redmunds
Copy link
Contributor

redmunds commented Dec 6, 2012

This works great in this case:

  1. Have multiple files open in working set
  2. Select and remember a file in working set
  3. Single-click to view a file in project tree file that's not in working set
  4. Press Cmd/Ctrl-W to close current file

Result: it switches back to file previously being edited in working set

But it's not working in this case:

  1. Have multiple files open in working set
  2. Select and remember a file in working set
  3. Select a different file in working set
  4. Close current file

Result: I haven't figured out the pattern, but in most cases it does not re-select the file being edited in step 2.

Note that there are several ways to close a file in Brackets, so be sure to test all of these:

  1. File > Close
  2. Cmd/Ctrl-W
  3. Move mouse over and click on x icon
  4. Right-click > Close

@TomMalbran
Copy link
Contributor Author

Not sure how I missed this. I did tested and worked, maybe the code wasn't fully updated. But this time it does work in all the cases.

@redmunds
Copy link
Contributor

redmunds commented Dec 6, 2012

Looks good. Merging.

redmunds added a commit that referenced this pull request Dec 6, 2012
Go to the most recently visited file when closing a file
@redmunds redmunds merged commit 26cdf78 into adobe:master Dec 6, 2012
peterflynn added a commit that referenced this pull request Dec 6, 2012
…e last

file in the working set, getNextPrevFile()'s semantics aren't a perfect
match for what we want. Need a special case.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants