Fix crash with side inspector on El Capitan

This commit is contained in:
1024jp 2017-02-17 20:45:56 +09:00
parent 04b11eafc2
commit 998bb6a1cb
2 changed files with 7 additions and 6 deletions

View File

@ -15,6 +15,7 @@ develop
### Fixes
- Fix an issue where the application crashed by the Highlight command under the condition when the find string is a invalid regular expression pattern even the regular expression is turned off.
- Fix an issue where the application could crash on El Capitan when a side inspector is about to open.
- Fix an issue on the text search where the single text search couldn't find the word intersects with the current selection.
- Fix an issue where the metadata of a custom theme cannot be edited.
- Fix an issue where the background of the line number view was drawn with wrong color when entered to the fullscreen mode.

View File

@ -254,12 +254,6 @@ final class WindowContentViewController: NSSplitViewController, TabViewControlle
/// set visibility and tab of sidebar
private func setSidebarShown(_ shown: Bool, index: SidebarViewController.TabIndex? = nil, animate: Bool = false) {
if let index = index {
self.siblings.forEach { sibling in
sibling.sidebarViewController!.selectedTabViewItemIndex = index.rawValue
}
}
guard NSAppKitVersionNumber >= Double(NSAppKitVersionNumber10_11) else {
self.isSidebarShown = shown
return
@ -268,6 +262,12 @@ final class WindowContentViewController: NSSplitViewController, TabViewControlle
NSAnimationContext.current().withAnimation(animate) {
self.isSidebarShown = shown
}
if let index = index {
self.siblings.forEach { sibling in
sibling.sidebarViewController!.selectedTabViewItemIndex = index.rawValue
}
}
}