add preferredColumn field to app type

This commit is contained in:
2024-10-18 06:44:45 +01:00
parent 92b834427c
commit 5f4be185e8
4 changed files with 27 additions and 7 deletions

View File

@@ -4,27 +4,41 @@ struct
fun bufferAndSize (app: app_type, newBuffer, newWidth, newHeight) =
let
val {buffer = _, windowWidth = _, windowHeight = _, startLine, cursorIdx} =
app
val
{ buffer = _
, windowWidth = _
, windowHeight = _
, startLine
, cursorIdx
, preferredColumn
} = app
in
{ buffer = newBuffer
, windowWidth = newWidth
, windowHeight = newHeight
, startLine = startLine
, cursorIdx = cursorIdx
, preferredColumn = preferredColumn
}
end
fun bufferAndCursorIdx (app: app_type, newBuffer, newCursorIdx) =
let
val {buffer = _, cursorIdx = _, windowWidth, windowHeight, startLine} =
app
val
{ buffer = _
, cursorIdx = _
, windowWidth
, windowHeight
, startLine
, preferredColumn
} = app
in
{ buffer = newBuffer
, cursorIdx = newCursorIdx
, windowWidth = windowWidth
, windowHeight = windowHeight
, startLine = startLine
, preferredColumn = preferredColumn
}
end
end