aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <nyamatongwe@gmail.com>2013-03-26 21:30:31 +1100
committernyamatongwe <nyamatongwe@gmail.com>2013-03-26 21:30:31 +1100
commitb115771bddfcc589ed883b456570f128d7304063 (patch)
treedd12e053bac73287e3739e7a15432383d974cea6
parent0a52837c6071a39289cd536bbe1e90be280b6398 (diff)
downloadscintilla-mirror-b115771bddfcc589ed883b456570f128d7304063.tar.gz
Detect resizes on the ScintillaView so that text is rewrapped.
-rw-r--r--cocoa/ScintillaView.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 9ff84240d..f9496cac1 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -1093,7 +1093,6 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa
if (!NSEqualRects([scrollView frame], scrollRect)) {
[scrollView setFrame: scrollRect];
- mBackend->Resize();
}
if (infoBarVisible)
@@ -1132,8 +1131,12 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa
*/
- (void) setFrame: (NSRect) newFrame
{
+ NSRect previousFrame = [self frame];
[super setFrame: newFrame];
[self positionSubViews];
+ if (!NSEqualRects(previousFrame, newFrame)) {
+ mBackend->Resize();
+ }
}
//--------------------------------------------------------------------------------------------------