Theme is now stored only with OakTextView (observed by OakDocumentView) and the “global” setting is stored in user defaults (not Global.tmProperties), though it is still possible to override theme on a file-by-file basis via .tm_properties files.
To get scroll content behind title/toolbar we need to set NSWindowStyleMaskFullSizeContentView which appears to have been inferred with the old (deprecated) WebView.
This avoids the need to map between the two enumeration constants, although we handle some of the constants before passing them to the find singleton, so the code has not yet been updated to remove the redundant mappings.
The property is renamed from ‘currentResponderIsOakTextView’ to the more appropriate ‘keyWindowHasBackAndForwardActions’.
Furthermore, the menu items are found via indexOfItemWithTarget:andAction: instead of by title, although the title of the submenus for these menu items is still hardcoded.
The problem is that if shiftLeft:/shiftRight: exist after goBack:/goForward: in the responder chain, we would prefer the former. This can happen because main window is after the key window in the responder chain, so if the former contains an OakTextView, a potential responder in the key window would never be found.
This is motivated by having received several crash reports from CFSocketManager over the years, example crash log from TextMate 2.0.8:
Thread 5 Crashed:: com.apple.CFSocket.private
0 libsystem_kernel.dylib os_fault_with_payload + 10
1 libsystem_kernel.dylib __darwin_check_fd_set_overflow.cold.1 + 31
2 libsystem_kernel.dylib __darwin_check_fd_set_overflow + 79
3 com.apple.CoreFoundation __CFSocketManager + 939
4 libsystem_pthread.dylib _pthread_start + 148
5 libsystem_pthread.dylib thread_start + 15
Although one of the new API methods is deprecated starting with macOS 10.15, but that change is minor, and the replacement wasn’t introduced before macOS 10.15.