Skip to content

Commit f0e8b9e

Browse files
authored
Merge pull request #1619 from ychin/whatsnew-nonpersistentdatastore
Whats New page use non-persistent data store
2 parents 53c1775 + b6a2cd4 commit f0e8b9e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/MacVim/MMWhatsNewController.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,19 @@ - (void)windowDidLoad
118118
messageTextField.stringValue = @"";
119119
}
120120

121+
WKWebViewConfiguration *config = [[[WKWebViewConfiguration alloc] init] autorelease];
122+
123+
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
124+
if (AVAILABLE_MAC_OS(10, 11)) {
125+
// Don't leave stale files in user's Library
126+
config.websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore];
127+
}
128+
#endif
129+
121130
// Construct a web view at runtime instead of relying on using the xib because this is
122131
// more backwards compatible as we can use runtime checks and compiler defines.
123132
_webView = [[WKWebView alloc] initWithFrame:NSZeroRect
124-
configuration:[[[WKWebViewConfiguration alloc] init] autorelease]];
133+
configuration:config];
125134

126135
[webViewContainer addSubview:_webView];
127136
_webView.frame = webViewContainer.bounds;

0 commit comments

Comments
 (0)