1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 11:37:32 +03:00

Fix some bugs of open quickly window

- do not scan packages
- do not crash when switching between neovim windows
- do not allow fullscreen
- close when losing focus
This commit is contained in:
Tae Won Ha 2016-09-11 14:37:04 +02:00 committed by Tae Won Ha
parent 893b8d2946
commit 157541d500
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
5 changed files with 13 additions and 1 deletions

View File

@ -14,6 +14,7 @@
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Open Quickly" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="38.open-quickly-window.frame" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES" texturedBackground="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES"/>
<windowPositionMask key="initialPositionMask" topStrut="YES"/>
<rect key="contentRect" x="196" y="420" width="365" height="255"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>

View File

@ -10,6 +10,7 @@ class FileItem : CustomStringConvertible {
let url: NSURL
let dir: Bool
let hidden: Bool
let package: Bool
/// When nil, then it has never been fnmatch'ed.
weak var ignoreToken: Token?
@ -31,6 +32,7 @@ class FileItem : CustomStringConvertible {
self.url = url
self.dir = url.dir
self.hidden = url.hidden
self.package = url.package
}
func removeChild(withUrl url: NSURL) {

View File

@ -154,7 +154,7 @@ class FileItemService {
curItem.children
.filter { item in
if item.hidden {
if item.hidden || item.package {
return false
}

View File

@ -54,6 +54,10 @@ extension NSURL {
var hidden: Bool {
return self.resourceValue(NSURLIsHiddenKey)
}
var package: Bool {
return self.resourceValue(NSURLIsPackageKey)
}
}
extension Array {

View File

@ -308,8 +308,13 @@ extension OpenQuicklyWindowComponent {
self.pattern = ""
self.flatFileItems = []
self.fileViewItems = []
self.fileView.reloadData()
self.searchField.stringValue = ""
self.countField.stringValue = "0 items"
}
func windowDidResignKey(notification: NSNotification) {
self.window.performClose(self)
}
}