PBREXBI62EXGQAYPXRATHZE57UZ4PCEVEBCZVTQV6KY5EFGCURTQC update_editor_box = function(node, preserve_screen_top_of_cursor_node)if node.editor == nil then return end-- Compute screen_top1 in viewport coordinates because the editor's font takes scaling into account.if vy(node.y) > 0 thenif not preserve_screen_top_of_cursor_node or node ~= Cursor_node thennode.editor.screen_top1.line = 1node.editor.screen_top1.pos = 1endnode.editor.top = vy(node.y)elsenode.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, -vy(node.y))endedit.update_font_settings(node.editor, scale(20))node.editor.left = math.floor(vx(node.x)) + Line_number_width*App.width(node.editor.em)node.editor.right = math.ceil(vx(node.x+node.w))Text.redraw_all(node.editor)end
{"y_of_schema1":364,"set_mouse_cursor":562,"on.text_input":521,"draw_ticks":566,"font":353,"vy":546,"maybe_update_key_in_definitions":529,"on.keychord_press":569,"on":1,"sy":469,"Manifest_navigator":495,"line_height":365,"Cursor_node":172,"parent":569,"add_thick_line":400,"copy_shape":396,"B":379,"compute_layout":385,"on.code_change":306,"Mouse_cursor":559,"A":507,"Definitions":503,"on.initialize":506,"Manifest":494,"sx":544,"Surface":422,"vx":545,"Page":475,"on.draw":565,"new_definition":504,"update_editor_box":570,"on.update":561,"Viewport":567,"load_manifest":496,"box_height":345,"get_manifest":497,"on_text":539,"on_handle":547,"on.key_release":552,"schema1_of_y":467,"on.mouse_press":556,"mouse_cursor":558,"on.mouse_release":554,"initialize_editor":450,"scale":7}
on.keychord_press = function(chord, key)if Move then return endif Manifest_navigator.reload thenload_manifest()endif chord == 'C-=' then-- zoom inViewport.zoom = Viewport.zoom+0.1B()elseif chord == 'C--' then-- zoom outViewport.zoom = Viewport.zoom-0.1B()elseif chord == 'C-0' then-- reset zoomViewport.zoom = 1.0B()elseif chord == 'C-q' thenlive.send_to_app('QUIT')elseif Manifest_navigator.show thenkeychord_press_on_manifest_navigator(chord, key)elseif chord == 'C-n' thennew_definition()elseif chord == 'C-l' thenManifest_navigator.show = trueManifest_navigator.for_delete = falseelseif chord == 'C-d' thenManifest_navigator.show = trueManifest_navigator.for_delete = trueelseif Cursor_node thenlocal old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)edit.keychord_press(Cursor_node.editor, chord, key)if not eq(Cursor_node.editor.screen_top1, old_top) thenViewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)A(--[[preserve screen_top of cursor node]] true)elseif chord == 'up' thenViewport.y = Viewport.y - scale(20)B()elseif chord == 'down' thenViewport.y = Viewport.y + scale(20)B()elseif chord == 'left' thenViewport.x = Viewport.x - scale(50)B()elseif chord == 'right' thenViewport.x = Viewport.x + scale(50)B()elseif chord == 'pageup' thenViewport.y = Viewport.y - App.screen.height/Viewport.zoomB()elseif chord == 'S-up' thenViewport.y = Viewport.y - App.screen.height/Viewport.zoomB()elseif chord == 'pagedown' thenViewport.y = Viewport.y + App.screen.height/Viewport.zoomB()elseif chord == 'S-down' thenViewport.y = Viewport.y + App.screen.height/Viewport.zoomB()elseif chord == 'S-left' thenViewport.x = Viewport.x - App.screen.width/Viewport.zoomB()elseif chord == 'S-right' thenViewport.x = Viewport.x + App.screen.width/Viewport.zoomB()endendend
{"on.initialize":506,"Viewport":567,"A":507,"y_of_schema1":364,"maybe_update_key_in_definitions":529,"on":1,"sy":469,"Cursor_node":172,"box_height":345,"line_height":365,"Manifest":494,"on_handle":547,"Surface":422,"on.draw":565,"initialize_editor":450,"new_definition":504,"sx":544,"on.key_release":552,"vx":545,"font":353,"on_text":539,"scale":7,"on.mouse_press":556,"parent":568,"on.mouse_release":554,"load_manifest":496,"copy_shape":396,"get_manifest":497,"on.keychord_press":569,"update_editor_box":479,"on.update":561,"on.code_change":306,"Page":475,"mouse_cursor":558,"Definitions":503,"Mouse_cursor":559,"compute_layout":385,"on.text_input":521,"B":379,"add_thick_line":400,"Manifest_navigator":495,"draw_ticks":566,"vy":546,"set_mouse_cursor":562,"schema1_of_y":467}