aboutsummaryrefslogtreecommitdiffstats
path: root/src/AppDelegate.m
diff options
context:
space:
mode:
authorTeddy Wing2023-08-22 00:50:52 +0200
committerTeddy Wing2023-08-22 00:52:17 +0200
commit6eafac8dcdd52eb8b1b386747116d9f5a9b63569 (patch)
treed80b0de9600754194272d8d2cc9e1dd4af2271d8 /src/AppDelegate.m
parent43b27f370c4299c9b89cb45d9690bab31c421a10 (diff)
downloadBase-Windowed-Application-6eafac8dcdd52eb8b1b386747116d9f5a9b63569.tar.bz2
AppDelegate: Set `allowsUndo` on the NSTextView
Just discovered this property which enables basic undo/redo functionality on the NSTextView. I can now confirm that the Undo and Redo menu bar items do in fact work.
Diffstat (limited to 'src/AppDelegate.m')
-rw-r--r--src/AppDelegate.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/AppDelegate.m b/src/AppDelegate.m
index 0ee85e9..d6cef3e 100644
--- a/src/AppDelegate.m
+++ b/src/AppDelegate.m
@@ -33,6 +33,7 @@
_text_view = [[NSTextView alloc]
initWithFrame:NSMakeRect(0, 0, 400, 400)];
+ [_text_view setAllowsUndo:YES];
[[_window contentView] addSubview:_text_view];
// [_window setContentView:_text_view];
}