Skip to content

Commit

Permalink
Merge pull request #25 from Mr0grog/24-set-document-timing-issue
Browse files Browse the repository at this point in the history
Fix document path timing issue in OakTextView -setDocument:
  • Loading branch information
Mr0grog authored Nov 18, 2016
2 parents a31f019 + 5ffa657 commit 74cbece
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions editorconfig-textmate/editorconfig-textmate-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.5</string>
<string>0.2.6-beta</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.2.5</string>
<string>0.2.6-beta</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2016 Rob Brackett. This is open source software and released under the MIT license.</string>
<key>NSPrincipalClass</key>
Expand Down
9 changes: 6 additions & 3 deletions source/additions/NSView+EditorConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ + (void)ec_init {
- (void)ec_setDocument:(id)document {
[self ec_setDocument:document];

NSString *fileName = self.window.representedFilename;
NSString *fileName = [document valueForKey:@"path"];
if (fileName == nil) {
fileName = [self.window.windowController representedFilename];
fileName = self.window.representedFilename;
if (fileName == nil) {
fileName = @"";
fileName = [self.window.windowController representedFilename];
if (fileName == nil) {
fileName = @"";
}
}
}

Expand Down

0 comments on commit 74cbece

Please sign in to comment.