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] Skip dropped files that are already open #4120

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

[CLOSED] Skip dropped files that are already open #4120

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

Comments

@core-ai-bot
Copy link
Member

Issue by gruehle
Saturday Jul 13, 2013 at 00:22 GMT
Originally opened as adobe/brackets#4447


Fix for #4429

If a dropped file is already open, skip it.


gruehle included the following code: https://github.com/adobe/brackets/pull/4447/commits

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday Jul 15, 2013 at 20:39 GMT


Reviewed, just found one bug.

@core-ai-bot
Copy link
Member Author

Comment by gruehle
Monday Jul 15, 2013 at 20:50 GMT


@njx - thanks, fix pushed.

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday Jul 15, 2013 at 21:09 GMT


It turns out that the logic for which one gets opened last isn't bulletproof due to race conditions, since all the opens are executing in parallel. In particular, if you drag on a group of files and some file other than the last one isn't already open, that's the one that will end up as selected (rather than the last one), because the already-opened last one completes earlier. But I don't think that matters, and arguably the behavior is actually reasonable (i.e. the user probably wants to see the one that wasn't already open, though if we wanted that explicitly, we shouldn't rely on the race).

Anyway, tl;dr - I'm going to merge this anyway :)

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