sokoban.love/0068-copy_editor

14 lines
438 B
Plaintext

copy_editor = function(state)
local new_state = edit.initialize_state(
Menu_bottom + 20, -- top
Safe_height/2-Line_height, -- bottom
Menu_left + 50 + Line_number_padding, -- left
math.min(100+30*App.width('m'), Safe_width*2/3), -- right
love.graphics.getFont():getHeight(), Line_height)
new_state.lines = map(state.lines,
function(line)
return {data=line.data}
end)
Text.redraw_all(new_state)
return new_state
end