Files
sml-projects/fcore/app-with.sml

40 lines
858 B
Standard ML
Raw Normal View History

2024-10-08 08:53:43 +01:00
structure AppWith =
struct
open AppType
fun bufferAndSize (app: app_type, newBuffer, newWidth, newHeight) =
let
val
{ mode
, buffer = _
, windowWidth = _
, windowHeight = _
, startLine
, cursorIdx
} = app
2024-10-08 08:53:43 +01:00
in
{ mode = mode
, buffer = newBuffer
2024-10-08 08:53:43 +01:00
, windowWidth = newWidth
, windowHeight = newHeight
, startLine = startLine
2024-10-09 10:59:32 +01:00
, cursorIdx = cursorIdx
2024-10-08 08:53:43 +01:00
}
end
fun bufferAndCursorIdx (app: app_type, newBuffer, newCursorIdx) =
let
val
{mode, buffer = _, cursorIdx = _, windowWidth, windowHeight, startLine} =
app
in
{ mode = mode
, buffer = newBuffer
, cursorIdx = newCursorIdx
, windowWidth = windowWidth
, windowHeight = windowHeight
, startLine = startLine
}
end
2024-10-08 08:53:43 +01:00
end