diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-03-26 09:55:02 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-03-26 09:55:02 -0700 |
commit | a3e5a1f22d7dce367e5d6a01420426b3fa4f35d5 (patch) | |
tree | 0d10b4dc018ab99c21794c146d1e745455f41439 /source_text.lua | |
parent | eae5c9505c665b343af7690d9665431ae17ed5e9 (diff) | |
download | lines.love-a3e5a1f22d7dce367e5d6a01420426b3fa4f35d5.tar.gz |
update stale source X-(
Diffstat (limited to 'source_text.lua')
-rw-r--r-- | source_text.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source_text.lua b/source_text.lua index fb4c389..4d13748 100644 --- a/source_text.lua +++ b/source_text.lua @@ -178,6 +178,7 @@ function Text.text_input(State, t) end function Text.insert_at_cursor(State, t) + assert(State.lines[State.cursor1.line].mode == 'text') local byte_offset = Text.offset(State.lines[State.cursor1.line].data, State.cursor1.pos) State.lines[State.cursor1.line].data = string.sub(State.lines[State.cursor1.line].data, 1, byte_offset-1)..t..string.sub(State.lines[State.cursor1.line].data, byte_offset) Text.clear_screen_line_cache(State, State.cursor1.line) |