Fix operation cancellation

This commit is contained in:
1024jp 2018-12-06 14:42:16 +09:00
parent 4c879beb5d
commit 18da3c5c21
2 changed files with 2 additions and 3 deletions

View File

@ -15,6 +15,7 @@ Change Log
- Improve the performance of text replacement significantly.
- Improve the line number view fundamentally so that all unwanted behaviors after macOS Mojave disappear.
- Select the setting selected in the last session when opening the Multiple Replacement window.
- Improve general performance and stability.
- [dev] Stop LineNumberView inheriting NSRulerView.

View File

@ -207,9 +207,7 @@ final class DocumentAnalyzer: NSObject {
}
// cancel waiting operations to avoid stacking large operations
self.editorInfoCountOperationQueue.operations
.filter { !$0.isExecuting }
.forEach { $0.cancel() }
self.editorInfoCountOperationQueue.cancelAllOperations()
self.editorInfoCountOperationQueue.addOperation(operation)
}