pull in new version of brolib-sml so that we can get bug fixes for LineGap.getLineNumberOfIdx, delete the TextWindow structure (which was previously used to get the start line to draw from), and replace previous usages of TextWindow with TextScroll.getStartLine. This enables us to scroll in a way tailored to the reimplemented TextBuilder (which do not wrap lines or characters)
This commit is contained in:
@@ -34,12 +34,11 @@ struct
|
||||
(* cursorLine > prevLineNumber *)
|
||||
let
|
||||
val howManyLinesWeCanFit = windowHeight div TC.ySpace
|
||||
val howManyLinesWeCanFit = howManyLinesWeCanFit - 2
|
||||
in
|
||||
if prevLineNumber + howManyLinesWeCanFit >= cursorLine then
|
||||
prevLineNumber
|
||||
if cursorLine > prevLineNumber + howManyLinesWeCanFit then
|
||||
cursorLine - howManyLinesWeCanFit
|
||||
else
|
||||
let val lineDifference = cursorLine - prevLineNumber
|
||||
in prevLineNumber + lineDifference
|
||||
end
|
||||
prevLineNumber
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user