aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChinh Nguyen <unknown>2017-10-26 08:19:49 +1100
committerChinh Nguyen <unknown>2017-10-26 08:19:49 +1100
commitfa523c177800d7036197754b50a5b4e86346e718 (patch)
tree87b25603c587bc9e3753f85bc8246b0fa5cb8696
parent195686c3c4088437a74582189b529e4a58e8225d (diff)
downloadscintilla-mirror-fa523c177800d7036197754b50a5b4e86346e718.tar.gz
Bug [#1979]. Fix Cocoa hang when Scintilla loaded from SMB share on macOS 10.13.
-rw-r--r--cocoa/InfoBar.mm14
-rw-r--r--doc/ScintillaHistory.html22
2 files changed, 31 insertions, 5 deletions
diff --git a/cocoa/InfoBar.mm b/cocoa/InfoBar.mm
index eb37124a8..9ac3c3a98 100644
--- a/cocoa/InfoBar.mm
+++ b/cocoa/InfoBar.mm
@@ -81,6 +81,10 @@
NSBundle *bundle = [NSBundle bundleForClass: [InfoBar class]];
NSString *path = [bundle pathForResource: @"info_bar_bg" ofType: @"tiff" inDirectory: nil];
+ // macOS 10.13 introduced bug where pathForResource: fails on SMB share
+ if (path == nil) {
+ path = [bundle.bundlePath stringByAppendingPathComponent: @"Resources/info_bar_bg.tiff"];
+ }
mBackground = [[NSImage alloc] initWithContentsOfFile: path];
if (!mBackground.valid)
NSLog(@"Background image for info bar is invalid.");
@@ -221,10 +225,12 @@ static float BarFontSize = 10.0;
- (void) drawRect: (NSRect) rect {
// Since the background is seamless, we don't need to take care for the proper offset.
// Simply tile the background over the invalid rectangle.
- NSPoint target = {rect.origin.x, 0};
- while (target.x < rect.origin.x + rect.size.width) {
- [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];
- target.x += mBackground.size.width;
+ if (mBackground.size.width != 0) {
+ NSPoint target = {rect.origin.x, 0};
+ while (target.x < rect.origin.x + rect.size.width) {
+ [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];
+ target.x += mBackground.size.width;
+ }
}
// Draw separator lines between items.
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 137c5abba..71d653a86 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -527,6 +527,18 @@
</li>
</ul>
<h3>
+ <a href="http://www.scintilla.org/scite402.zip">Release 4.0.2</a>
+ </h3>
+ <ul>
+ <li>
+ Released 23 October 2017.
+ </li>
+ <li>
+ Fix Cocoa hang when Scintilla loaded from SMB share on macOS 10.13.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1979/">Bug #1979</a>.
+ </li>
+ </ul>
+ <h3>
<a href="http://www.scintilla.org/scite401.zip">Release 4.0.1</a>
</h3>
<ul>
@@ -812,7 +824,15 @@
</li>
<li>
SciTE on Windows Find strip Find button works in incremental no-close mode.
- <a href="http://sourceforge.net/p/scintilla/bugs/1926/">Bug #1926</a>.
+ <
+
+
+
+
+
+
+
+href="http://sourceforge.net/p/scintilla/bugs/1926/">Bug #1926</a>.
</li>
</ul>
<h3>