aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaView.mm
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2023-02-24 10:43:05 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2023-02-24 10:43:05 +1100
commita00f308a11b90a0edb1bd9a71a78612e0463fe83 (patch)
treec97e63f5fb0c24833e81b7d634e0dc315d3ad822 /cocoa/ScintillaView.mm
parent778dc10b3ee2f621d8548b1d074429c44bd3ae62 (diff)
downloadscintilla-mirror-a00f308a11b90a0edb1bd9a71a78612e0463fe83.tar.gz
Replace deprecated graphicsPort API with current CGContext.
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r--cocoa/ScintillaView.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index ad074b496..6e113b523 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -373,7 +373,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) {
* Gets called by the runtime when the view needs repainting.
*/
- (void) drawRect: (NSRect) rect {
- CGContextRef context = (CGContextRef) [NSGraphicsContext currentContext].graphicsPort;
+ CGContextRef context = CGContextCurrent();
if (!mOwner.backend->Draw(rect, context)) {
dispatch_async(dispatch_get_main_queue(), ^ {