mirror of
https://github.com/qvacua/vimr.git
synced 2024-10-27 18:34:58 +03:00
GH-227 Guard against empty flat file items
This commit is contained in:
parent
4a41685da6
commit
411897bea8
@ -37,6 +37,10 @@ class OpenQuicklyFilterOperation: Operation {
|
||||
return
|
||||
}
|
||||
|
||||
if self.flatFileItems.isEmpty {
|
||||
return
|
||||
}
|
||||
|
||||
let sorted: [ScoredFileItem]
|
||||
if pattern.characters.count == 0 {
|
||||
let truncatedItems = self.flatFileItems[0...min(self.maxResultCount, self.flatFileItems.count - 1)]
|
||||
|
@ -154,9 +154,8 @@ class OpenQuicklyWindowComponent: WindowComponent,
|
||||
})
|
||||
.addDisposableTo(self.perSessionDisposeBag)
|
||||
|
||||
self.cwd = mainWindow.cwd as URL
|
||||
self.cwd = mainWindow.cwd
|
||||
let flatFiles = self.fileItemService.flatFileItems(ofUrl: self.cwd)
|
||||
.subscribeOn(self.userInitiatedScheduler)
|
||||
|
||||
self.searchStream
|
||||
.subscribe(onNext: { [unowned self] pattern in
|
||||
|
Loading…
Reference in New Issue
Block a user