one_time_load = function() if Current_pane.is_stash then print('loading '..Current_pane.filename..' from stash') else print('loading '..Current_pane.filename) end edit.clear(Current_pane.editor_state) local dir = Current_pane.is_stash and Stash_directory or Directory Current_pane.editor_state.filename = dir..Current_pane.filename load_from_disk(Current_pane.editor_state) Text.redraw_all(Current_pane.editor_state) -- Disable autosave; undo isn't accessible in mobile devices. Current_pane.editor_state.filename = nil -- Clear some other recent state Current_pane.editor_state.next_save = nil end