begin moving text window when cursor goes off screen (currently, we only move the window when cursor goes backwards but this works fine and as expected)
This commit is contained in:
@@ -22,7 +22,8 @@ struct
|
||||
}
|
||||
end
|
||||
|
||||
fun bufferAndCursorIdx (app: app_type, newBuffer, newCursorIdx, newMode) =
|
||||
fun bufferAndCursorIdx
|
||||
(app: app_type, newBuffer, newCursorIdx, newMode, newStartLine) =
|
||||
let
|
||||
val
|
||||
{ mode = _
|
||||
@@ -30,15 +31,15 @@ struct
|
||||
, cursorIdx = _
|
||||
, windowWidth
|
||||
, windowHeight
|
||||
, startLine
|
||||
, startLine = _
|
||||
} = app
|
||||
in
|
||||
{ mode = newMode
|
||||
, buffer = newBuffer
|
||||
, cursorIdx = newCursorIdx
|
||||
, startLine = newStartLine
|
||||
, windowWidth = windowWidth
|
||||
, windowHeight = windowHeight
|
||||
, startLine = startLine
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user