Skip to content

Commit

Permalink
Fixes #1200
Browse files Browse the repository at this point in the history
  • Loading branch information
Chillee committed Jun 9, 2017
1 parent 98e3285 commit 5850dab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@
"diff-match-patch": "^1.0.0",
"lodash": "^4.12.0",
"neovim-client": "^2.1.0",
"promised-neovim-client": "^2.0.2"
"promised-neovim-client": "^2.0.2",
"untildify": "^3.0.2"
},
"devDependencies": {
"@types/mocha": "^2.2.39",
Expand Down
2 changes: 2 additions & 0 deletions src/cmd_line/commands/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as vscode from "vscode";
import * as path from "path";
import * as fs from "fs";
import * as node from "../node";
const untildify = require('untildify');

export enum FilePosition {
CurrentWindow,
Expand Down Expand Up @@ -69,6 +70,7 @@ export class FileCommand extends node.CommandBase {
}

let currentFilePath = vscode.window.activeTextEditor!.document.uri.path;
this._arguments.name = <string>untildify(this._arguments.name);
let newFilePath = path.isAbsolute(this._arguments.name) ?
this._arguments.name :
path.join(path.dirname(currentFilePath), this._arguments.name);
Expand Down

0 comments on commit 5850dab

Please sign in to comment.