aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cocoa/ScintillaCocoa.h2
-rw-r--r--cocoa/ScintillaCocoa.mm22
-rw-r--r--src/Editor.h4
3 files changed, 26 insertions, 2 deletions
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
@@ -729,6 +729,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
* window proc. The given parameters directly reflect the message parameters used on Windows.
diff --git a/src/Editor.h b/src/Editor.h
index 388053777..da4787b0a 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -356,8 +356,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
void SetTopLine(int topLineNew);
bool AbandonPaint();
- void RedrawRect(PRectangle rc);
- void Redraw();
+ virtual void RedrawRect(PRectangle rc);
+ virtual void Redraw();
void RedrawSelMargin(int line=-1, bool allAfter=false);
PRectangle RectangleFromRange(int start, int end);
void InvalidateRange(int start, int end);