Don't add pane items in built-in resource openers #13575

Merged
merged 1 commit into from Jan 9, 2017

Projects

None yet

1 participant

@nathansobo
Contributor

Calling workspace.open in an opener doesn't work properly with options like split: left because it causes the opened item to be added to the workspace as a side-effect. Since workspace openers are intended to be used during the process of calling workspace.open, we need to use openTextFile, which just creates an editor but does not attach it to the workspace.

@nathansobo nathansobo Don't add pane items in built-in resource openers
Calling `workspace.open` in an opener doesn't work properly with options
like `split: left` because it causes the opened item to be added to the
workspace as a side-effect. Since workspace openers are intended to be
used during the process of calling `workspace.open`, we need to use
`openTextFile`, which just creates an editor but does not attach it to
the workspace.
730c7c8
@nathansobo nathansobo merged commit c5ac436 into master Jan 9, 2017

4 of 5 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@nathansobo nathansobo deleted the ns-fix-built-in-resource-openers branch Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment