diff options
author | nyamatongwe <nyamatongwe@gmail.com> | 2013-03-26 21:30:31 +1100 |
---|---|---|
committer | nyamatongwe <nyamatongwe@gmail.com> | 2013-03-26 21:30:31 +1100 |
commit | 11ac19d2904e240aea5d38324374a6eca634d42f (patch) | |
tree | fd359c975fa1800180b833a58cbe7889373f344f | |
parent | 9929e5c1ddf785456cd57ea893fef1bd3c397ca2 (diff) | |
download | scintilla-mirror-11ac19d2904e240aea5d38324374a6eca634d42f.tar.gz |
Detect resizes on the ScintillaView so that text is rewrapped.
-rw-r--r-- | cocoa/ScintillaView.mm | 5 |
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(); + } } //-------------------------------------------------------------------------------------------------- |