mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: paste protection text should be selectable
This commit is contained in:
@ -22,7 +22,7 @@ class PasteProtectionController: NSWindowController {
|
|||||||
override func windowDidLoad() {
|
override func windowDidLoad() {
|
||||||
guard let window = window else { return }
|
guard let window = window else { return }
|
||||||
window.contentView = NSHostingView(rootView: PasteProtectionView(
|
window.contentView = NSHostingView(rootView: PasteProtectionView(
|
||||||
contents: "Hello",
|
contents: "Hello\nWorld",
|
||||||
delegate: delegate
|
delegate: delegate
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,6 @@ struct PasteProtectionView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextEditor(text: .constant(contents))
|
TextEditor(text: .constant(contents))
|
||||||
.disabled(true)
|
|
||||||
.textSelection(.enabled)
|
.textSelection(.enabled)
|
||||||
.font(.system(.body, design: .monospaced))
|
.font(.system(.body, design: .monospaced))
|
||||||
.padding(.all, 4)
|
.padding(.all, 4)
|
||||||
|
Reference in New Issue
Block a user