pass 'maxLength' value to TextScroll function so that we can prevent scrolling past the bottom of the file (unless we want to od so by centtering the screen)
This commit is contained in:
@@ -52,7 +52,8 @@ struct
|
||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||
val cursorLine = LineGap.idxToLineNumber (cursorIdx, buffer)
|
||||
val startLine =
|
||||
TextScroll.getStartLine (prevLineNumber, cursorLine, windowHeight)
|
||||
TextScroll.getStartLine
|
||||
(prevLineNumber, cursorLine, windowHeight, #lineLength buffer)
|
||||
val buffer = LineGap.goToLine (startLine, buffer)
|
||||
|
||||
val remainingWindowHeight = windowHeight - (TextConstants.ySpace * 2)
|
||||
@@ -122,7 +123,8 @@ struct
|
||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||
val cursorLine = LineGap.idxToLineNumber (cursorIdx, buffer)
|
||||
val startLine =
|
||||
TextScroll.getStartLine (prevLineNumber, cursorLine, newWindowHeight)
|
||||
TextScroll.getStartLine
|
||||
(prevLineNumber, cursorLine, newWindowHeight, #lineLength buffer)
|
||||
val buffer = LineGap.goToLine (startLine, buffer)
|
||||
|
||||
val remainingWindowHeight = newWindowHeight - (TextConstants.ySpace * 2)
|
||||
|
||||
Reference in New Issue
Block a user