aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/ScintillaTest/AppController.mm4
-rw-r--r--cocoa/ScintillaView.mm15
2 files changed, 15 insertions, 4 deletions
diff --git a/cocoa/ScintillaTest/AppController.mm b/cocoa/ScintillaTest/AppController.mm
index c835ba0de..9356ce1b8 100644
--- a/cocoa/ScintillaTest/AppController.mm
+++ b/cocoa/ScintillaTest/AppController.mm
@@ -116,6 +116,8 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL.
}
}
+ [mEditor suspendDrawing: TRUE];
+
// Keywords to highlight. Indices are:
// 0 - Major keywords (reserved keywords)
// 1 - Normal keywords (everything not reserved but integral part of the language)
@@ -219,6 +221,8 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL.
// Uncomment if you wanna see auto wrapping in action.
//[mEditor setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 0];
+ [mEditor suspendDrawing: FALSE];
+
InfoBar* infoBar = [[[InfoBar alloc] initWithFrame: NSMakeRect(0, 0, 400, 0)] autorelease];
[infoBar setDisplay: IBShowAll];
[mEditor setInfoBar: infoBar top: NO];
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 54988f650..cee96def5 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -1349,10 +1349,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) {
* (like clearing all marks and setting new ones etc.).
*/
- (void) suspendDrawing: (BOOL) suspend {
- if (suspend)
- [self.window disableFlushWindow];
- else
- [self.window enableFlushWindow];
+ if (@available(macOS 10.14, *)) {
+ // Don't try where deprecated
+ } else {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ if (suspend)
+ [self.window disableFlushWindow];
+ else
+ [self.window enableFlushWindow];
+#pragma GCC diagnostic pop
+ }
}
//--------------------------------------------------------------------------------------------------