Skip to content

Commit

Permalink
Disable live scroll notifications on OS X 10.8
Browse files Browse the repository at this point in the history
NSScrollViewDidEndLiveScrollNotification is available only on 10.9
onwards. Will probably need to find another way to implement this in
MacDown 0.4.5, but for now let's just perform version-sniffing as
a stop-gap.

Ref #241, close #311
  • Loading branch information
uranusjr committed Mar 16, 2015
1 parent 2b44a74 commit 65dcba5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions MacDown/Code/Document/MPDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,12 @@ - (void)windowControllerDidLoadNib:(NSWindowController *)controller
name:MPDidRequestEditorSetupNotification object:nil];
[center addObserver:self selector:@selector(didRequestPreviewReload:)
name:MPDidRequestPreviewRenderNotification object:nil];
[center addObserver:self selector:@selector(previewDidLiveScroll:)
name:NSScrollViewDidEndLiveScrollNotification
object:self.preview.enclosingScrollView];
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_9)
{
[center addObserver:self selector:@selector(previewDidLiveScroll:)
name:NSScrollViewDidEndLiveScrollNotification
object:self.preview.enclosingScrollView];
}

self.wordsMenuItem = [[NSMenuItem alloc] initWithTitle:@"" action:NULL
keyEquivalent:@""];
Expand Down

0 comments on commit 65dcba5

Please sign in to comment.