From 34c7fb0c468bdc12a8afdfc46a204e003ef2ffe0 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 7 Jan 2021 20:57:59 +0000 Subject: [PATCH] lint scroll.js --- src/static/js/scroll.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/static/js/scroll.js b/src/static/js/scroll.js index 34d9868a6..852d63e17 100644 --- a/src/static/js/scroll.js +++ b/src/static/js/scroll.js @@ -353,10 +353,9 @@ Scroll.prototype.movePage = function (direction) { // linePosition contains top and bottom, might be useful // if the buffer of a fixed value isn't working as intended const linePosition = caretPosition.getPosition(); - const buffer = 25; // we need to remember that lineoffset needs to be removed too.. - let offset = linePosition.bottom - viewport.top; - let lineHeight = linePosition.top - linePosition.bottom; + const offset = linePosition.bottom - viewport.top; + const lineHeight = linePosition.top - linePosition.bottom; let pixelsToScroll = viewport.top - viewport.bottom + offset; if (direction === 'up') { // buffer pixels unscrolled our safety net here. You can't use the current or previous