From fbac5206d8bd5094e13be6691d986bd12975b8f7 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Tue, 3 Dec 2013 22:14:21 +1100 Subject: Fix problems with appearance of newly scrolled content on OS X 10.9 where previously prepared content was shown. --- cocoa/ScintillaCocoa.h | 2 ++ cocoa/ScintillaCocoa.mm | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'cocoa') diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h index 8d182e866..358019b46 100644 --- a/cocoa/ScintillaCocoa.h +++ b/cocoa/ScintillaCocoa.h @@ -114,6 +114,8 @@ protected: Point GetVisibleOriginInMain(); PRectangle GetClientRectangle(); Point ConvertPoint(NSPoint point); + virtual void RedrawRect(PRectangle rc); + virtual void Redraw(); virtual void Initialise(); virtual void Finalise(); diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 7e2c00ebb..e74beffdc 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -728,6 +728,28 @@ Scintilla::Point ScintillaCocoa::ConvertPoint(NSPoint point) //-------------------------------------------------------------------------------------------------- +/** + * Do not clip like superclass as Cocoa is not reporting all of prepared area. + */ +void ScintillaCocoa::RedrawRect(PRectangle rc) +{ + if (!rc.Empty()) + wMain.InvalidateRectangle(rc); +} + +//-------------------------------------------------------------------------------------------------- + +/** + * Ensure all of prepared content is also redrawn. + */ +void ScintillaCocoa::Redraw() +{ + wMargin.InvalidateAll(); + wMain.InvalidateAll(); +} + +//-------------------------------------------------------------------------------------------------- + /** * A function to directly execute code that would usually go the long way via window messages. * However this is a Windows metaphor and not used here, hence we just call our fake -- cgit v1.2.3