If it has a name, it'll try to be keyed by its name. If it is empty or the name collides it'll have a positional name.
OEWRTQIK5VNX6GEQF4JYHELTZSTLJKQARLIC557M53RJVJD2YDRQC maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)--print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)--print('found at index', pos)assert(pos)table.remove(Definitions, pos)elseif Definitions[old_definition_name] == Cursor_node then--print('found at key', old_definition_name)Definitions[old_definition_name] = nilendif definition_name and Definitions[definition_name] == nil then--print('moving to key', definition_name)Definitions[definition_name] = Cursor_nodeelseif definition_name == nil or Definitions[definition_name] then-- temporary collision; try again later-- deleting and reinserting is inefficient, but hopefully rare--print('moving to index', #Definitions+1)table.insert(Definitions, Cursor_node)end--print('-- definition keys')--for k in pairs(Definitions) do--print(k)--endendend
{"on.code_change":306,"box_height":345,"font":353,"compute_layout":385,"Definitions":503,"parent":528,"scale":7,"Surface":422,"A":507,"add_thick_line":400,"on.draw":452,"vx":5,"copy_shape":396,"vy":462,"update_editor_box":479,"sy":469,"on.initialize":506,"on.mouse_release":367,"initialize_editor":450,"on.update":368,"schema1_of_y":467,"on.keychord_press":522,"B":379,"Page":475,"Cursor_node":172,"Manifest":494,"Manifest_navigator":495,"on.mouse_press":179,"Viewport":505,"on":1,"load_manifest":496,"on.text_input":521,"maybe_update_key_in_definitions":529,"y_of_schema1":364,"new_definition":504,"to_text":180,"get_manifest":497,"line_height":365}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)assert(pos)table.remove(Definitions, pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)Definitions[old_definition_name] = nilendif definition_name and Definitions[definition_name] == nil thenprint('moving to key', definition_name)Definitions[definition_name] = Cursor_nodeelseif definition_name == nil or Definitions[definition_name] then-- temporary collision; try again later-- deleting and reinserting is inefficient, but hopefully rareprint('moving to index', #Definitions+1)table.insert(Definitions, Cursor_node)endprint('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"Viewport":505,"line_height":365,"vy":462,"on.initialize":506,"update_editor_box":479,"Manifest":494,"load_manifest":496,"on":1,"copy_shape":396,"A":507,"schema1_of_y":467,"Definitions":503,"B":379,"parent":527,"on.code_change":306,"maybe_update_key_in_definitions":528,"Surface":422,"on.text_input":521,"Cursor_node":172,"vx":5,"sy":469,"y_of_schema1":364,"to_text":180,"new_definition":504,"compute_layout":385,"on.mouse_release":367,"initialize_editor":450,"get_manifest":497,"scale":7,"Page":475,"font":353,"add_thick_line":400,"on.keychord_press":522,"on.update":368,"on.mouse_press":179,"on.draw":452,"Manifest_navigator":495,"box_height":345}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)assert(pos)table.remove(Definitions, pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)Definitions[old_definition_name] = nilendif definition_name and Definitions[definition_name] == nil thenprint('moving to key', definition_name)Definitions[definition_name] = Cursor_nodeelseif definition_name == nil or Definitions[definition_name] then-- temporary collision; try again later-- deleting and reinserting is inefficient, but hopefully rareprint('moving to index', #Definitions+1)table.insert(Definitions, definition_name)endprint('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"on.update":368,"on.keychord_press":522,"load_manifest":496,"Page":475,"scale":7,"add_thick_line":400,"copy_shape":396,"to_text":180,"initialize_editor":450,"sy":469,"Manifest_navigator":495,"parent":526,"font":353,"maybe_update_key_in_definitions":527,"box_height":345,"compute_layout":385,"on":1,"on.code_change":306,"vx":5,"Surface":422,"Definitions":503,"schema1_of_y":467,"on.draw":452,"line_height":365,"Manifest":494,"on.mouse_release":367,"Viewport":505,"B":379,"Cursor_node":172,"y_of_schema1":364,"A":507,"vy":462,"get_manifest":497,"new_definition":504,"on.mouse_press":179,"on.initialize":506,"on.text_input":521,"update_editor_box":479}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)assert(pos)table.remove(Definitions, pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)Definitions[old_definition_name] = nilendif definition_name and Definitions[definition_name] == nil thenprint('moving to key', definition_name)Definitions[definition_name] = Cursor_nodeelseif definition_name == nil or Definitions[definition_name] then-- temporary collision; try again later-- deleting and reinserting is inefficient, but hopefully rareprint('moving to index', #Definitions)table.insert(Definitions, definition_name)endprint('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"get_manifest":497,"on.keychord_press":522,"on.text_input":521,"update_editor_box":479,"line_height":365,"on.initialize":506,"Definitions":503,"to_text":180,"new_definition":504,"parent":525,"on":1,"schema1_of_y":467,"on.draw":452,"scale":7,"box_height":345,"vx":5,"compute_layout":385,"Manifest":494,"y_of_schema1":364,"on.code_change":306,"initialize_editor":450,"maybe_update_key_in_definitions":526}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)assert(pos)table.remove(Definitions, pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)Definitions[old_definition_name] = nilendif definition_name and Definitions[definition_name] == nil thenprint('moving to key', definition_name)Definitions[definition_name] = Cursor_nodeelseif Definitions[definition_name] then-- temporary collision; try again later-- deleting and reinserting is inefficient, but hopefully rareprint('moving to index', #Definitions)table.insert(Definitions, definition_name)endprint('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"get_manifest":497,"on.keychord_press":522,"on.text_input":521,"update_editor_box":479,"line_height":365,"on.initialize":506,"Definitions":503,"to_text":180,"new_definition":504,"parent":524,"on":1,"schema1_of_y":467,"on.draw":452,"scale":7,"box_height":345,"vx":5,"compute_layout":385,"Manifest":494,"y_of_schema1":364,"on.code_change":306,"initialize_editor":450,"maybe_update_key_in_definitions":525}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)assert(pos)table.remove(Definitions, pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)Definitions[old_definition] = nilendif definition_name and Definitions[definition_name] == nil thenprint('moving to key', definition_name)Definitions[definition_name] = Cursor_nodeelseif Definitions[definition_name] then-- temporary collision; try again later-- deleting and reinserting is inefficient, but hopefully rareprint('moving to index', #Definitions)table.insert(Definitions, definition_name)endprint('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"get_manifest":497,"on.keychord_press":522,"on.text_input":521,"update_editor_box":479,"line_height":365,"on.initialize":506,"Definitions":503,"to_text":180,"new_definition":504,"parent":522,"on":1,"schema1_of_y":467,"on.draw":452,"scale":7,"box_height":345,"vx":5,"compute_layout":385,"Manifest":494,"y_of_schema1":364,"on.code_change":306,"initialize_editor":450,"maybe_update_key_in_definitions":524}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)assert(pos)table.remove(Definitions, pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)Definitions[old_definition] = nilendif definition_name and Definitions[definition_name] == nil thenprint('moving to key', definition_name)Definitions[definition_name] = Cursor_nodeelseif Definitions[definition_name] the-- temporary collision; try again later-- deleting and reinserting is inefficient, but hopefully rareprint('moving to index', #Definitions)table.insert(Definitions, definition_name)endprint('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"initialize_editor":450,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"get_manifest":497,"on.keychord_press":522,"on.text_input":521,"parent":522,"line_height":365,"on.initialize":506,"Definitions":503,"font":353,"new_definition":504,"update_editor_box":479,"on":1,"schema1_of_y":467,"Manifest":494,"scale":7,"box_height":345,"compute_layout":385,"y_of_schema1":364,"vx":5,"on.draw":452,"on.code_change":306,"to_text":180,"maybe_update_key_in_definitions":523}
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}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
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"initialize_editor":450,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"get_manifest":497,"on.keychord_press":522,"on.text_input":521,"parent":521,"line_height":365,"on.initialize":506,"Definitions":503,"font":353,"new_definition":504,"update_editor_box":479,"on":1,"schema1_of_y":467,"Manifest":494,"scale":7,"box_height":345,"compute_layout":385,"y_of_schema1":364,"vx":5,"on.draw":452,"on.code_change":306,"to_text":180,"maybe_update_key_in_definitions":519}
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}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)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)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)endend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"initialize_editor":450,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"get_manifest":497,"on.keychord_press":513,"on.text_input":521,"parent":519,"line_height":365,"on.initialize":506,"Definitions":503,"font":353,"new_definition":504,"update_editor_box":479,"on":1,"schema1_of_y":467,"Manifest":494,"scale":7,"box_height":345,"compute_layout":385,"y_of_schema1":364,"vx":5,"on.draw":452,"on.code_change":306,"to_text":180,"maybe_update_key_in_definitions":519}
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}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)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)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)endA(--[[preserve screen_top of cursor node]] true)endend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"initialize_editor":450,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"on.draw":452,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":519,"on.keychord_press":513,"on.text_input":520,"y_of_schema1":364,"to_text":180,"on.initialize":506,"Definitions":503,"get_manifest":497,"new_definition":504,"update_editor_box":479,"on":1,"schema1_of_y":467,"Manifest_navigator":495,"scale":7,"box_height":345,"line_height":365,"compute_layout":385,"vx":5,"Manifest":494,"on.code_change":306,"font":353,"maybe_update_key_in_definitions":519}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, Cursor_node)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)-- Definitions[old_definition] = nilendprint('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"initialize_editor":450,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"on.draw":452,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":517,"on.keychord_press":513,"on.text_input":517,"y_of_schema1":364,"to_text":180,"on.initialize":506,"Definitions":503,"get_manifest":497,"new_definition":504,"update_editor_box":479,"on":1,"schema1_of_y":467,"Manifest_navigator":495,"scale":7,"box_height":345,"line_height":365,"compute_layout":385,"vx":5,"Manifest":494,"on.code_change":306,"font":353,"maybe_update_key_in_definitions":519}
maybe_update_key_in_definitions = function(old_definition_name, definition_name, )print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)-- Definitions[old_definition] = nilendprint('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endendend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":517,"on.keychord_press":513,"on.text_input":517,"get_manifest":497,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"maybe_update_key_in_definitions":518}
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}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)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)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil or Definitions[old_definition_name] ~= Cursor_node thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)-- Definitions[old_definition] = nilendprint('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endendA(--[[preserve screen_top of cursor node]] true)endend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":516,"on.keychord_press":513,"on.text_input":517,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)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)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)print(old_definition_name, definition_name)if old_definition_name ~= definition_name or Definitions[old_definition_name] ~= Cursor_node thenif old_definition_name == nil thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)-- Definitions[old_definition] = nilendprint('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endendA(--[[preserve screen_top of cursor node]] true)endend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":515,"on.keychord_press":513,"on.text_input":516,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)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)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)print(old_definition_name, definition_name)if old_definition_name ~= definition_name thenif old_definition_name == nil thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)-- Definitions[old_definition] = nilendprint('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endendA(--[[preserve screen_top of cursor node]] true)endend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":514,"on.keychord_press":513,"on.text_input":515,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)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)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)if old_definition_name ~= definition_name thenif old_definition_name == nil thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)-- Definitions[old_definition] = nilendprint('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endendA(--[[preserve screen_top of cursor node]] true)endend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":513,"on.keychord_press":513,"on.text_input":514,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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}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)if old_definition_name ~= definition_name thenif old_definition_name == nil thenlocal pos = array.find(Definitions, Cursor_node)print('found at index', pos)elseif Definitions[old_definition_name] == Cursor_node thenprint('found at key', old_definition_name)-- Definitions[old_definition] = nilendprint('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endendA(--[[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
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":512,"on.keychord_press":513,"on.text_input":511,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)print('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)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
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":511,"on.keychord_press":512,"on.text_input":511,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)print('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)endA(--[[preserve screen_top of cursor node]] true)endend
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":510,"on.keychord_press":510,"on.text_input":511,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":509,"on.keychord_press":510,"on.text_input":487,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
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)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)print('current definition name', definition_name)print('-- definition keys')for k in pairs(Definitions) doprint(k)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
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":508,"on.keychord_press":509,"on.text_input":487,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}
on.keychord_press = function(chord, key)print('-- definition keys')for k in pairs(Definitions) doprint(k)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}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
{"A":507,"B":379,"Viewport":505,"vy":462,"on.mouse_press":179,"on.mouse_release":367,"font":353,"on.update":368,"add_thick_line":400,"Surface":422,"copy_shape":396,"Page":475,"Manifest_navigator":495,"Cursor_node":172,"load_manifest":496,"sy":469,"parent":507,"on.keychord_press":508,"on.text_input":487,"to_text":180,"on.initialize":506,"Definitions":503,"vx":5,"new_definition":504,"on.draw":452,"on":1,"schema1_of_y":467,"y_of_schema1":364,"scale":7,"box_height":345,"initialize_editor":450,"compute_layout":385,"Manifest":494,"line_height":365,"on.code_change":306,"update_editor_box":479,"get_manifest":497}