From 11ac19d2904e240aea5d38324374a6eca634d42f Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 26 Mar 2013 21:30:31 +1100 Subject: Detect resizes on the ScintillaView so that text is rewrapped. --- cocoa/ScintillaView.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cocoa') 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(); + } } //-------------------------------------------------------------------------------------------------- -- cgit v1.2.3