support undo of paste button
Dependencies
- [2]
SIJ5I4NZextract a helper for buttons - [3]
5MEJ7XNHlay out buttons based on device dimensions - [4]
RK2ASPN7add lots of buttons to the toolbar
Change contents
- edit in 0067-paste_button at line 4
local state = Current_pane.editor_state-- initial state for recording undo operationlocal before_line = state.cursor1.linelocal before = snapshot(state, before_line)-- paste - replacement in 0067-paste_button at line 10
Text.insert_text(Current_pane.editor_state, s)Text.insert_text(state, s)-- record undo operationrecord_undo_event(state,{before=before,after=snapshot(state, before_line,state.cursor1.line)}) - replacement in 0067-paste_button at line 20
end[2.850]end