mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 22:57:58 +01:00
Fixed :cd not changing to home dir
This commit is contained in:
@@ -174,9 +174,13 @@ vimperator.Bookmarks = function () //{{{
|
|||||||
|
|
||||||
isBookmarked: function(url)
|
isBookmarked: function(url)
|
||||||
{
|
{
|
||||||
var uri = ioService.newURI(url, null, null);
|
try
|
||||||
var count = {};
|
{
|
||||||
bookmarksService.getBookmarkIdsForURI(uri, count);
|
var uri = ioService.newURI(url, null, null);
|
||||||
|
var count = {};
|
||||||
|
bookmarksService.getBookmarkIdsForURI(uri, count);
|
||||||
|
}
|
||||||
|
catch (e) { return false; }
|
||||||
|
|
||||||
return count.value > 0;
|
return count.value > 0;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -737,7 +737,10 @@ vimperator.Commands = function () //{{{
|
|||||||
commandManager.add(new vimperator.Command(["cd", "chd[ir]"],
|
commandManager.add(new vimperator.Command(["cd", "chd[ir]"],
|
||||||
function (args)
|
function (args)
|
||||||
{
|
{
|
||||||
if (!args || vimperator.io.setCurrentDirectory(args))
|
if (!args)
|
||||||
|
args = "~";
|
||||||
|
|
||||||
|
if (vimperator.io.setCurrentDirectory(args))
|
||||||
vimperator.echo(vimperator.io.getCurrentDirectory());
|
vimperator.echo(vimperator.io.getCurrentDirectory());
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user