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] Go to the most recently visited file when closing a file #2048

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

[CLOSED] Go to the most recently visited file when closing a file #2048

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

Comments

@core-ai-bot
Copy link
Member

Issue by TomMalbran
Thursday Nov 15, 2012 at 08:28 GMT
Originally opened as adobe/brackets#2122


This would add what was suggested in adobe/brackets#2091


TomMalbran included the following code: https://github.com/adobe/brackets/pull/2122/commits

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Thursday Dec 06, 2012 at 00:06 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Thursday Dec 06, 2012 at 00:06 GMT


Done with initial review.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Thursday Dec 06, 2012 at 06:13 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Thursday Dec 06, 2012 at 17:25 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Thursday Dec 06, 2012 at 20:49 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Thursday Dec 06, 2012 at 21:42 GMT


Looks good. Merging.

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