There's still lots of issues. We need to go from disabling exceptions to disabling everything by default and enabling a few exceptions.
X25YKED2GFLM4K6U5LTFZCSHGLM2HRT7SO4RKSLP4ARCHKZIAJUQC on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' or chord == 'backspace' or chord == 'return' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.keychord_press":73,"on.initialize":36,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"on":1,"fw_parent":72,"on.text_input":69,"on.mouse_release":59,"on.mouse_press":63,"Editors":6,"resync_editors":70,"initialize_editors":67,"fw_app":"broadsheet"}
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' or chord == 'backspace' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.text_input":69,"on.mouse_release":59,"on":1,"resync_editors":70,"fw_parent":71,"on.keychord_press":72,"fw_app":"broadsheet","on.initialize":36,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"initialize_editors":67,"Editors":6,"on.mouse_press":63}
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"fw_app":"broadsheet","on.text_input":69,"on.initialize":36,"resync_editors":70,"on.draw":60,"on":1,"fw_parent":70,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":71,"Cursor_editor":16}
resync_editors = function()edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors doEditors[e].screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}edit.draw(Editors[e], Text_color) -- initialize screen_bottom1endend
{"fw_app":"broadsheet","on.text_input":69,"on.initialize":36,"resync_editors":70,"on.draw":60,"on":1,"fw_parent":69,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
on.text_input = function(t)if Editors[1].search_term thenedit.text_input(Editors[1], t)resync_editors()endend
{"fw_app":"broadsheet","on.text_input":69,"on.initialize":36,"resync_editors":68,"on.draw":60,"on":1,"fw_parent":68,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
resync_editors = function()edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors doEditors[e].screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}edit.draw(Editors[i], Text_color) -- initialize screen_bottom1endend
{"fw_app":"broadsheet","on.text_input":66,"on.initialize":36,"resync_editors":68,"on.draw":60,"on":1,"fw_parent":67,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
initialize_editors = function(font_height, filename, screen_top)Editors = {}love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = filenameload_from_disk(Editors[1])Text.redraw_all(Editors[1])for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].linesText.redraw_all(editor) -- TODO: share fragments between editorsendEditors[1].screen_top = screen_topresync_editors()end
{"fw_app":"broadsheet","on.text_input":66,"on.initialize":36,"on.draw":60,"on":1,"fw_parent":66,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
on.text_input = function(t)if Editorext_input(Editors[1], t) thenresync_editors()endend
{"fw_app":"broadsheet","on.keychord_press":45,"initialize_editors":62,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"on.initialize":36,"Editors":6,"on.mouse_press":63,"on.text_input":66,"on.mouse_release":59,"fw_parent":64,"on":1}
on.text_input = function(t)if Editorext_input(Editors[1], t)resync_editors()endend
{"fw_app":"broadsheet","on.keychord_press":45,"initialize_editors":62,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"on.initialize":36,"Editors":6,"on.mouse_press":63,"on.text_input":65,"on.mouse_release":59,"fw_parent":64,"on":1}
on.text_input = function(t)for _,editor in ipairs(Editors) doedit.text_input(editor, t)endend
{"fw_app":"broadsheet","on":1,"on.keychord_press":45,"initialize_editors":62,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"on.text_input":64,"on.mouse_press":63,"on.mouse_release":59,"fw_parent":63,"on.initialize":36}