Skip to content

Commit

Permalink
update title on undo-redo
Browse files Browse the repository at this point in the history
  • Loading branch information
Sin-tel committed Sep 23, 2023
1 parent 709c2e4 commit 987c253
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/undo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ function Undo.undo()
if Undo.index >= 1 then
song = deepcopy(Undo.stack[Undo.index].song)
Selection.setFromIndices(Undo.stack[Undo.index].selection)

-- title can change
File.setTitle()
else
Undo.index = 1
setMessage("nothing to undo!")
Expand All @@ -62,6 +65,9 @@ function Undo.redo()
if Undo.stack[Undo.index] then
song = deepcopy(Undo.stack[Undo.index].song)
Selection.setFromIndices(Undo.stack[Undo.index].selection)

-- title can change
File.setTitle()
else
Undo.index = #Undo.stack
setMessage("nothing to redo!")
Expand Down

0 comments on commit 987c253

Please sign in to comment.