1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 23:36:08 +03:00

GH-296 Use == for tools and make a property private

This commit is contained in:
Tae Won Ha 2016-11-13 23:32:50 +01:00
parent 05178e5214
commit f326ddf70a
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,8 @@ class Workspace: NSView, WorkspaceBarDelegate {
}
}
fileprivate var tools = [WorkspaceTool]()
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@ -43,7 +45,6 @@ class Workspace: NSView, WorkspaceBarDelegate {
// MARK: - API
let mainView: NSView
let bars: [WorkspaceBarLocation: WorkspaceBar]
var tools = [WorkspaceTool]()
let config: Config
weak var delegate: WorkspaceDelegate?

View File

@ -532,7 +532,7 @@ extension WorkspaceBar {
if self.isOpen {
let curTool = self.selectedTool!
if curTool === tool {
if curTool == tool {
// In this case, curTool.isSelected is already set to false in WorkspaceTool.toggle()
self.selectedTool = nil
} else {