new menu option: revert local changes

akkartik
Mar 17, 2024, 7:15 PM
GYFNSF33NGUAYEECESFKCSE4BYYFQGOF5XTQI4NQKXUUBTARHBVQC

Dependencies

  • [2] RLXBO23F swap copy and paste menu buttons
  • [*] R5QXEHUI somebody stop me
  • [*] 5RUFNRJO start of the visual skeleton
  • [*] 5MEJ7XNH lay out buttons based on device dimensions

Change contents

  • file addition: 0179-press_revert_button (----------)
    [4.2]
    press_revert_button = function()
    Show_menu = nil
    love.filesystem.remove(Directory..Current_pane.filename)
    -- As a sort of undo, we don't mess with the bufferr. Conservatively indicate that there are unsaved changes.
    Current_pane.editor_state.next_save = Current_time + 3
    end
  • file addition: 0178-revert_button (----------)
    [4.2]
    revert_button = function(x,y, r)
    return overflowable_button('revert', x, y, r, press_revert_button, --[[final button?]] false)
    end
  • edit in 0021-draw_menu at line 18
    [2.29]
    [6.4861]
    if Current_pane.filename and has_local_modifications(Current_pane.filename) then
    x, y = revert_button(x, y, r)
    end