Make ShaderViewer::ensureLineScrolled more conservative

This commit is contained in:
baldurk committed 2020-02-06 17:58:41 +00:00
1 parent c9b96421ae
commit 14c1af06a3
1 file changed
+1 -1
+1 -1
View File
@@ -2471,7 +2471,7 @@ void ShaderViewer::ensureLineScrolled(ScintillaEdit *s, int line)
int firstLine = s->firstVisibleLine();
int linesVisible = s->linesOnScreen();
if(s->isVisible() && (line < firstLine || line > (firstLine + linesVisible)))
if(s->isVisible() && (line < firstLine || line > (firstLine + linesVisible - 1)))
s->setFirstVisibleLine(qMax(0, line - linesVisible / 2));
}