Skip to content

"open file in external editor" should provide the full path - #4381

Merged
niik merged 5 commits into
masterfrom
open-should-specify-full-path
Apr 5, 2018
Merged

niik merged 5 commits into
masterfrom
open-should-specify-full-path

Conversation

@shiftkey

@shiftkey shiftkey commented Apr 3, 2018

Copy link
Copy Markdown
Member

Found this one while trying to address a merge conflict by editing the file and VS Code would continue to show me a file without merge conflicts. Relates to #4030.

Repro steps:

  • have multiple versions of a repository on disk (I'm using desktop as an example)
  • use these both in VS Code (Atom does the same thing).
  • modify a file so that it appears in the Changes list. For this repro, I've deleted all the lines in tslint.json.

  • right-click and select Open in [External Editor]

Expected:

  • editor is launched, file shown matches expected diff from Desktop (no lines)

Actual:

  • editor is launched, but file is different local clone (original content shown)

If you break into in the launchExternalEditor function in app/src/lib/editors/launch.ts you'll see the relative file path is passed through to the spawn API:

It looks like VS Code and Atom are smart enough to find a workspace containing the file, but because it lacks the repository directory it keeps choosing the wrong workspace - leading me to be very confused.

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 3, 2018
@shiftkey shiftkey added this to the 1.1.x milestone Apr 3, 2018
@niik niik self-assigned this Apr 3, 2018
Comment thread app/src/lib/dispatcher/dispatcher.ts Outdated
* Opens a path (can either be a folder representing a repository or the
* path to a file) in the external editor selected by the user.
*/
public async openInExternalEditor(path: string): Promise<void> {

This comment was marked as spam.

@shiftkey
shiftkey force-pushed the open-should-specify-full-path branch from 86482fa to 3ea4f71 Compare April 3, 2018 21:05
@shiftkey

shiftkey commented Apr 4, 2018

Copy link
Copy Markdown
Member Author

🍎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants