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 c69f1b5 commit 608bb0d
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

1 comment on commit 608bb0d

@xconverge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same guy that makes the clipboardy library! @sindresorhus we appreciate your work very much!! :)

Please sign in to comment.