Take into account editor bottom margin in scroll link extension

This commit is contained in:
benweet 2013-11-16 20:56:09 +00:00
parent 67aeaf5c1e
commit 2d5c6b28a0

View File

@ -148,7 +148,7 @@ define([
destScrollTop = getDestScrollTop(previewScrollTop, htmlSectionList, mdSectionList); destScrollTop = getDestScrollTop(previewScrollTop, htmlSectionList, mdSectionList);
destScrollTop = _.min([ destScrollTop = _.min([
destScrollTop, destScrollTop,
aceEditor.session.getScreenLength() * aceEditor.renderer.lineHeight - aceEditor.renderer.$size.scrollerHeight aceEditor.session.getScreenLength() * aceEditor.renderer.lineHeight + aceEditor.renderer.scrollMargin.bottom - aceEditor.renderer.$size.scrollerHeight
]); ]);
// If negative, set it to zero // If negative, set it to zero
destScrollTop < 0 && (destScrollTop = 0); destScrollTop < 0 && (destScrollTop = 0);