CutBox.app

Coverage Report

Created: 2024-03-12 03:40

.../Source/App/JSFuncSearchPreview/JSFuncSearchTextViewDelegate.swift
Line
Count
Source
1
//
2
//  SearchJSFuncTextViewDelegate.swift
3
//  CutBox
4
//
5
//  Created by Jason Milkins on 17/5/18.
6
//  Copyright © 2018-2023 ocodo. All rights reserved.
7
//
8
9
import Cocoa
10
11
extension JSFuncSearchAndPreviewView: NSTextViewDelegate {
12
1
    func textDidChange(_ notification: Notification) {
13
1
        self.filterTextPublisher.onNext(self.searchText.string)
14
1
    }
15
16
10
    func textView(_ textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool {
17
10
        return useTextCommands.contains(commandSelector)
18
10
    }
19
}