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

When multiple tabs with the same file are open, "Project Plus: Close" is unable to close them #85

Open
dev169 opened this issue Dec 23, 2016 · 1 comment

Comments

@dev169
Copy link

dev169 commented Dec 23, 2016

Bug as above. The rest of the tabs/splits/etc are closed, but the tabs that point to the same file are left open. Closing one of them closes the other too.

Atom 1.13.0-beta8
project-plus 0.9.0

@dev169
Copy link
Author

dev169 commented Dec 27, 2016

I've traced this back to this function:

function closeAllBuffers () {
  atom.project.getBuffers().forEach((buffer) => {
    if (buffer) buffer.release()
  })
}

I've modified it like so and it seems to work correctly now:

function closeAllBuffers () {
    atom.workspace.getTextEditors().forEach((textEditor) => {
    if (textEditor) {
        textEditor.getBuffer().release()
    }
  })
}

I'm not sure if there any caveats with my approach,

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