mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-12 05:55:52 +01:00
error message for non-existing :cd dir
This commit is contained in:
@@ -118,10 +118,11 @@ vimperator.IO = function ()//{{{
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newdir = this.expandPath(newdir);
|
newdir = this.expandPath(newdir);
|
||||||
if (!this.getFile(newdir).isDirectory())
|
var file = this.getFile(newdir);
|
||||||
|
if (!file.exists() || !file.isDirectory())
|
||||||
{
|
{
|
||||||
vimperator.echoerr("E344: Can't find directory \"" + newdir + "\" in path");
|
vimperator.echoerr("E344: Can't find directory \"" + newdir + "\" in path");
|
||||||
return this.getCurrentDirectory();
|
return null;
|
||||||
}
|
}
|
||||||
[cwd, oldcwd] = [newdir, cwd];
|
[cwd, oldcwd] = [newdir, cwd];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user