1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 11:35:35 +03:00

Merge branch 'develop' into issue/296-workspace

This commit is contained in:
Tae Won Ha 2016-11-13 22:55:25 +01:00
commit 05178e5214
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
2 changed files with 7 additions and 5 deletions

View File

@ -315,7 +315,7 @@ extension FileOutlineView {
return
}
guard item.isDir else {
guard self.level(forItem: clickedItem) > 0 else {
return
}
@ -335,12 +335,14 @@ extension FileOutlineView {
return true
}
if item.action == #selector(setAsWorkingDirectory(_:))
|| item.action == #selector(setParentAsWorkingDirectory(_:))
{
if item.action == #selector(setAsWorkingDirectory(_:)) {
return clickedItem.isDir
}
if item.action == #selector(setParentAsWorkingDirectory(_:)) {
return self.level(forItem: clickedItem) > 0
}
return true
}
}

View File

@ -177,7 +177,7 @@ class MainWindowComponent: WindowComponent, NSWindowDelegate, NSUserInterfaceVal
self.neoVimView.cwd = url
case let FileBrowserAction.setParentAsWorkingDirectory(url: url):
self.neoVimView.cwd = self.neoVimView.cwd.parent
self.neoVimView.cwd = url.parent
default:
NSLog("unrecognized action: \(action)")