Things are a hot mess right now. Perhaps pulling commands.lua directly in was a bad idea and I should have added them gradually into the editor. However, it's nice to see multiple definitions and I don't have that yet in the driver. We'll eventually decontruct commands.lua away into nothing.
The major issue I'm stuck on is the representation of definitions in memory. Each needs to be an editor buffer. I'd like to be able to get to each by name. However, what should happen if I edit a buffer to change the code inside it?
Y6O2RFHV5UGHFS3ZZEH5HPKN5I7SV74GEV47MTI4WGJPAINJMBZAC love.graphics.rectangle('fill', 0,Menu_bar_height, App.screen.width, Manifest_navigator.num_lines * (Editor_state.line_height + --[[highlight padding]]5) + --[[extra highlight padding for bottom]] 2)
love.graphics.rectangle('fill', 0,Menu_bar_height, App.screen.width, Manifest_navigator.num_lines * (HUD_line_height + --[[highlight padding]]5) + --[[extra highlight padding for bottom]] 2)
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":506,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":505,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":506,"add_thick_line":400,"A":507,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
A = function(preserve_screen_top_of_cursor_node)-- translate Definitions to SurfaceSurface = {}for _,node in pairs(Definitions) docompute_layout(node, node.x,node.y, Surface, preserve_screen_top_of_cursor_node)end-- continue the pipelineB(preserve_screen_top_of_cursor_node)-- TODO: ugly that we're manipulating editor objects twiceend
on.initialize = function()load_manifest()new_definition()A()end
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":505,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":505,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":506,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":504,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":505,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":500,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
Viewport = {x=-50, y=-50, w=800,h=600, zoom=1.0}
new_definition = function()table.insert(Definitions, {type='text',data={''},x=0, y=0,width=400, bg={r=0.7,g=0.7,b=1},})end
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":503,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":459,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":500,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":502,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":459,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":500,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
Definitions = {-- table mapping names to boxes where we edit their definitions}
on.keychord_press = function(chord, key)if 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}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)endA(--[[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":500,"vx":5,"scale":7,"on.mouse_press":179,"to_text":180,"Viewport":459,"get_manifest":497,"compute_layout":385,"A":433,"Cursor_node":172,"vy":462,"on.keychord_press":502,"line_height":365,"add_thick_line":400,"copy_shape":396,"y_of_schema1":364,"parent":501,"Page":475,"box_height":345,"update_editor_box":479,"on.mouse_release":367,"initialize_editor":450,"sy":469,"font":353,"Manifest":494,"on.update":368,"on.text_input":487,"on.draw":452,"Manifest_navigator":495,"load_manifest":496,"on.code_change":306,"Surface":422,"schema1_of_y":467,"B":379,"on":1}
on.keychord_press = function(chord, key)if 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-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}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)endA(--[[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.code_change":306,"Manifest_navigator":495,"Viewport":459,"compute_layout":385,"line_height":365,"vy":462,"vx":5,"y_of_schema1":364,"Manifest":494,"copy_shape":396,"on.mouse_press":179,"on.text_input":487,"on.mouse_release":367,"on.update":368,"schema1_of_y":467,"sy":469,"on.draw":452,"Surface":422,"load_manifest":496,"A":433,"initialize_editor":450,"B":379,"on.initialize":500,"get_manifest":497,"add_thick_line":400,"on":1,"parent":500,"update_editor_box":479,"on.keychord_press":501,"scale":7,"font":353,"to_text":180,"box_height":345,"Page":475,"Cursor_node":172}
on.initialize = function()load_manifest()print('on.initialize', Manifest_navigator.show)A()end
{"Viewport":459,"scale":7,"schema1_of_y":467,"compute_layout":385,"on.mouse_press":179,"y_of_schema1":364,"font":353,"Manifest_navigator":495,"load_manifest":496,"get_manifest":497,"on.keychord_press":492,"line_height":365,"on.text_input":487,"vx":5,"to_text":180,"on.update":368,"parent":499,"Page":475,"on.initialize":500,"box_height":345,"A":433,"copy_shape":396,"on":1,"B":379,"initialize_editor":450,"add_thick_line":400,"Manifest":494,"update_editor_box":479,"Cursor_node":172,"on.code_change":306,"sy":469,"on.draw":452,"Surface":422,"vy":462,"on.mouse_release":367}
on.initialize = function()load_manifest()A()end
{"on.mouse_press":179,"on.mouse_release":367,"on.update":368,"to_text":180,"Manifest":494,"on":1,"schema1_of_y":467,"sy":469,"B":379,"on.draw":452,"Surface":422,"Cursor_node":172,"on.initialize":499,"box_height":345,"on.text_input":487,"update_editor_box":479,"on.code_change":306,"Page":475,"load_manifest":496,"get_manifest":497,"y_of_schema1":364,"scale":7,"Manifest_navigator":495,"vy":462,"on.keychord_press":492,"font":353,"Viewport":459,"vx":5,"A":433,"compute_layout":385,"parent":498,"initialize_editor":450,"add_thick_line":400,"line_height":365,"copy_shape":396}
on.initialize = function()load_manifestA()end
{"Surface":422,"on.initialize":498,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"load_manifest":496,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"get_manifest":497,"Manifest":494,"parent":497,"initialize_editor":450,"sy":469}
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"load_manifest":496,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"get_manifest":497,"Manifest":494,"parent":496,"initialize_editor":450,"sy":469}
get_manifest = function()live.send_to_app('MANIFEST')local response_stringrepeatlove.timer.sleep(0.01)response_string = live.receive_from_app()until response_stringlocal result = {}if #response_string == 0 then-- error; retryreturn resultelse-- stop retryingManifest_navigator.reload = falseendlocal response = json.decode(response_string)for name in pairs(response) doif name ~= 'parent' thentable.insert(result, name)endendreturn resultend
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"load_manifest":496,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"Manifest":494,"parent":495,"initialize_editor":450,"sy":469}
load_manifest = function()local new_manifest = get_manifest()-- preserve existing order-- 1. add new definitions in frontfor _,name in ipairs(new_manifest) doif not array.find(Manifest, name) thentable.insert(Manifest, 1, name)endend-- 2. remove missing definitionsfor idx=#Manifest,1,-1 dolocal name = Manifest[idx]if not array.find(new_manifest, name) thentable.remove(Manifest, idx)endendend
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"Manifest":494,"parent":494,"initialize_editor":450,"sy":469}
Manifest_navigator = {-- state for the command palettedisplay = false, -- display navigator on screenfor_delete = false, -- if true, delete selected definition from navigatorreload = false, -- if true, refresh manifest to display on next keystrokenum_lines = nil, -- number of screen lines of space to devote to the navigatorindex = 1, -- where the cursor is right now. Modified on arrow keys, reset on any non-arrow keystroke.filter = '', -- prefix being typed into the command palettecandidates = Manifest, -- list of candidates matching filterbottom_y = nil, -- cache a tiny bit of state in display logic}
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"scale":7,"schema1_of_y":467,"Manifest_navigator":480,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"Manifest":494,"parent":493,"initialize_editor":450,"sy":469}
Manifest = {-- list of definitions to display-- TODO: can we just reuse Live.manifest here?}
on.initialize = function()A()end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":492,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":493,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":492,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if Manifest_navigator.reload thenload_manifest()endprint('AAA', chord, Manifest_navigator.show)if 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 thenprint('CCC')keychord_press_on_manifest_navigator(chord, key)elseif chord == 'C-l' thenprint('BBB')Manifest_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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":491,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":492,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if Manifest_navigator.reload thenload_manifest()endprint('AAA', chord, Manifest_navigator.show)if 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 thenprint('CCC')keychord_press_on_manifest_navigator(chord, key)elseif chord == 'C-l' thenprint('BBB')Manifest_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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":490,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":491,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if Manifest_navigator.reload thenload_manifest()endprint('AAA', chord)if 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 thenprint('CCC')keychord_press_on_manifest_navigator(chord, key)elseif chord == 'C-l' thenprint('BBB')Manifest_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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":489,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":490,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if Manifest_navigator.reload thenload_manifest()endprint('AAA', chord)if 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-l' thenprint('BBB')Manifest_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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":488,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":489,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if Manifest_navigator.reload thenload_manifest()endprint('AAA', chord)if 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-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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":487,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":488,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.text_input = function(t)if Manifest_navigator.show thentext_input_on_manifest_navigator(t)elseif Cursor_node thenlocal old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}edit.text_input(Cursor_node.editor, t)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)endA(--[[preserve screen_top of cursor node]] true)endend
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":486,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":486,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if 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-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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":485,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":486,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if 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-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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":484,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":485,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if 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 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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":483,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":484,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if 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-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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":482,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":483,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.initialize = function()load_manifest()A()end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":481,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":481,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)if 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-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}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)endA(--[[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
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":480,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":481,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":479,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":391,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
Manifest_navigator = {-- state for the command palettedisplay = false,for_delete = false,reload = false,}
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))endnode.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))edit.update_font_settings(node.editor, scale(20))Text.redraw_all(node.editor)end
{"Page":475,"initialize_editor":450,"sy":469,"parent":478,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":391,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
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))endnode.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))edit.update_font_settings(node.editor, scale(20))Text.redraw_all(node.editor)end
{"Page":475,"initialize_editor":450,"sy":469,"parent":477,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":478,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":391,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}