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
commit11ac19d2904e240aea5d38324374a6eca634d42f (patch)
treefd359c975fa1800180b833a58cbe7889373f344f
parent9929e5c1ddf785456cd57ea893fef1bd3c397ca2 (diff)
downloadscintilla-mirror-11ac19d2904e240aea5d38324374a6eca634d42f.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();
+ }
}
//--------------------------------------------------------------------------------------------------