mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Focus target document when clicking find result table row
This commit is contained in:
parent
ab310211be
commit
f77df903ed
@ -13,6 +13,7 @@ Change Log
|
||||
- Update the Unicode block name list for the character inspector from Unicode 14.0.0 to Unicode 15.0.0.
|
||||
- Deprecate the option to keep the progress dialog for find/replacement after finishing the task.
|
||||
- Deprecate the option not to select the next match after the replacement when clicking the Replace button.
|
||||
- [trivial] Make the target document the key window when selecting a matched line in the find result view.
|
||||
- [trivial] Tweak the style of headings in menus.
|
||||
- [trivial] Tweak the setting summary display in the print dialog.
|
||||
- [dev] Migrate the most of sheets and popovers to SwiftUI.
|
||||
|
@ -149,8 +149,8 @@ final class FindPanelResultViewController: NSViewController, NSTableViewDataSour
|
||||
self.findString = findString
|
||||
self.results = results
|
||||
|
||||
let documentName = (target.window?.windowController?.document as? NSDocument)?.displayName ?? "Unknown" // This should never be nil.
|
||||
let resultMessage: String = {
|
||||
let documentName = (target.window?.windowController?.document as? NSDocument)?.displayName ?? "Unknown" // This should never be nil.
|
||||
switch results.count {
|
||||
case 0:
|
||||
return String(localized: "No strings found in “\(documentName).”")
|
||||
@ -190,6 +190,7 @@ final class FindPanelResultViewController: NSViewController, NSTableViewDataSour
|
||||
else { return }
|
||||
|
||||
textView.select(range: range)
|
||||
textView.window?.makeKeyAndOrderFront(nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user