diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2024-08-31 18:34:03 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2024-08-31 18:36:05 -0700 |
commit | 5c8e3e96c8b852394cd2b0956d6e9bb0b6cc543d (patch) | |
tree | d4289ee7e00cf48bfc291d7638c6fc20f5f85b5b /source_edit.lua | |
parent | a8158f97177be80ebfcf70df49fe6ba281450d07 (diff) | |
download | view.love-5c8e3e96c8b852394cd2b0956d6e9bb0b6cc543d.tar.gz |
clean up Drawing.before after creating undo event
This isn't a bug here, but it led to a bug in lines 2.
Diffstat (limited to 'source_edit.lua')
-rw-r--r-- | source_edit.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source_edit.lua b/source_edit.lua index fead6c5..f92ca0f 100644 --- a/source_edit.lua +++ b/source_edit.lua @@ -190,6 +190,7 @@ function edit.draw(State, hide_cursor, show_line_numbers) State.cursor1.line = State.cursor1.line+1 end record_undo_event(State, {before=Drawing.before, after=snapshot(State, line_index-1, line_index+1)}) + Drawing.before = nil schedule_save(State) end, }) |