diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-12-19 17:36:13 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-12-19 17:36:13 -0800 |
commit | 35bc6106aa64e9efefbdf49cc93e4e8e269d4bee (patch) | |
tree | 56afbc1be14436221f56a713eff19a53fbe8f36e | |
parent | 4b6a8aaba65c404a4acdcaa128a83285bee12a27 (diff) | |
parent | 35206826052cf8e0c93361897f14fc577c8c4882 (diff) | |
download | text.love-35bc6106aa64e9efefbdf49cc93e4e8e269d4bee.tar.gz |
Merge lines.love
-rw-r--r-- | reference.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/reference.md b/reference.md index 5f2d4d3..74698ba 100644 --- a/reference.md +++ b/reference.md @@ -203,9 +203,6 @@ early warning if you break something. editor state on the app window as requested in the call to `edit.initialize_state` that created `state`. -* `edit.update(state, dt)` -- call this from `App.update` to periodically - auto-save editor contents to disk. - * `edit.mouse_press(state, x,y, mouse_button)` and `edit.mouse_release(x,y, mouse_button)` -- call these to position the cursor or select some text. @@ -223,6 +220,12 @@ early warning if you break something. * `Text.redraw_all(state)` -- call this to clear and recompute any cached state as the cursor moves and the buffer scrolls. +* `edit.update(state, dt)` -- call this from `App.update` to periodically + auto-save editor contents to disk. + +* `edit.quit(state)` -- call this from `App.quit` to ensure any final edits + get saved before quitting. + If you need more precise control, look at the comment at the top of `edit.initialize_state` in edit.lua. In brief, the widget contains an array of `lines`. Positions in the buffer are described in _schema-1_ locations |