add function to get the appropriate scroll column

This commit is contained in:
2025-09-11 16:17:56 +01:00
parent e85ac5e806
commit 77439acef6
4 changed files with 30 additions and 1 deletions

View File

@@ -14,6 +14,10 @@ struct
let
val {windowWidth, windowHeight, startLine, searchString, ...} = app
(* calculate scroll column *)
val buffer = LineGap.goToIdx (cursorIdx, buffer)
val visualScrollColumn = TextScroll.getScrollColumn (buffer, cursorIdx, windowWidth)
(* move LineGap to first line displayed on screen *)
val buffer = LineGap.goToLine (startLine, buffer)