progress parsing normal mode commands
This commit is contained in:
@@ -22,13 +22,18 @@ struct
|
||||
}
|
||||
end
|
||||
|
||||
fun bufferAndCursorIdx (app: app_type, newBuffer, newCursorIdx) =
|
||||
fun bufferAndCursorIdx (app: app_type, newBuffer, newCursorIdx, newMode) =
|
||||
let
|
||||
val
|
||||
{mode, buffer = _, cursorIdx = _, windowWidth, windowHeight, startLine} =
|
||||
app
|
||||
{ mode = _
|
||||
, buffer = _
|
||||
, cursorIdx = _
|
||||
, windowWidth
|
||||
, windowHeight
|
||||
, startLine
|
||||
} = app
|
||||
in
|
||||
{ mode = mode
|
||||
{ mode = newMode
|
||||
, buffer = newBuffer
|
||||
, cursorIdx = newCursorIdx
|
||||
, windowWidth = windowWidth
|
||||
@@ -36,4 +41,18 @@ struct
|
||||
, startLine = startLine
|
||||
}
|
||||
end
|
||||
|
||||
fun mode (app: app_type, newMode) =
|
||||
let
|
||||
val {mode = _, buffer, cursorIdx, windowWidth, windowHeight, startLine} =
|
||||
app
|
||||
in
|
||||
{ mode = newMode
|
||||
, buffer = buffer
|
||||
, cursorIdx = cursorIdx
|
||||
, windowWidth = windowWidth
|
||||
, windowHeight = windowHeight
|
||||
, startLine = startLine
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user