diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-08-15 10:31:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-08-15 11:00:35 -0700 |
commit | a655c2113cdc80095402243ce41e1322dea535ab (patch) | |
tree | 87fcd7af0242e1791c732c14f47556653cc02f87 /undo.lua | |
parent | 778f77a4585c538211f79e717bae35fd650eee90 (diff) | |
download | view.love-a655c2113cdc80095402243ce41e1322dea535ab.tar.gz |
bring back a level of wrapping
Many projects will require the ability to add metadata to lines, so let's not drop that.
Diffstat (limited to 'undo.lua')
-rw-r--r-- | undo.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/undo.lua b/undo.lua index 9e55fe8..912c949 100644 --- a/undo.lua +++ b/undo.lua @@ -57,7 +57,8 @@ function snapshot(State, s,e) } -- deep copy lines without cached stuff like text fragments for i=s,e do - table.insert(event.lines, State.lines[i]) + local line = State.lines[i] + table.insert(event.lines, {data=line.data}) end return event end |