add function to retrieve column that cursor is on, relative to line

This commit is contained in:
2024-10-19 07:03:32 +01:00
parent 5f4be185e8
commit 7fd59c734a
4 changed files with 116 additions and 5 deletions

View File

@@ -22,23 +22,23 @@ struct
}
end
fun bufferAndCursorIdx (app: app_type, newBuffer, newCursorIdx) =
fun bufferAndCursorIdx (app: app_type, newBuffer, newCursorIdx, newColumn) =
let
val
{ buffer = _
, cursorIdx = _
, preferredColumn = _
, windowWidth
, windowHeight
, startLine
, preferredColumn
} = app
in
{ buffer = newBuffer
, cursorIdx = newCursorIdx
, preferredColumn = newColumn
, windowWidth = windowWidth
, windowHeight = windowHeight
, startLine = startLine
, preferredColumn = preferredColumn
}
end
end