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:
parent
893b8d2946
commit
157541d500
@ -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"/>
|
||||
|
@ -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) {
|
||||
|
@ -154,7 +154,7 @@ class FileItemService {
|
||||
|
||||
curItem.children
|
||||
.filter { item in
|
||||
if item.hidden {
|
||||
if item.hidden || item.package {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,10 @@ extension NSURL {
|
||||
var hidden: Bool {
|
||||
return self.resourceValue(NSURLIsHiddenKey)
|
||||
}
|
||||
|
||||
var package: Bool {
|
||||
return self.resourceValue(NSURLIsPackageKey)
|
||||
}
|
||||
}
|
||||
|
||||
extension Array {
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user