This fix wasn't found as cleanly as this commit suggests. The dataflow is getting quite complex:
C472R5Z2F5ORCBB46YKBEKROI7EBVFDNYBLPMEJDE74M2ZMALIRQC
{"load_from_iterator":670,"get_definition_from_app":624,"on.code_change":306,"manifest_navigator_up":628,"manifest_navigator_down":635,"Page":475,"Cursor_node":172,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"on.keychord_press":666,"text_input_on_manifest_navigator":634,"tick_spec":660,"manifest_coord":636,"on_text":539,"manifest_navigator_candidates":638,"add_def_to_menu":640,"sx":544,"vx":545,"load_definition":674,"on.key_release":552,"Viewport":604,"mouse_cursor":558,"on.update":561,"vy":546,"line_height":365,"draw_ticks":663,"box_height":345,"on.mouse_press":617,"order_of_magnitude":573,"approximate":579,"sy":469,"Surface":422,"update_editor_box":570,"on.draw":565,"Ticks_font":669,"schema1_of_y":667,"y_of_schema1":364,"on.mouse_release":554,"on":1,"set_mouse_cursor":562,"maybe_update_key_in_definitions":529,"on.text_input":521,"Mouse_cursor":559,"keychord_press_on_manifest_navigator":675,"draw_cursor":639,"Manifest":494,"B":379,"manifest_index":637,"load_manifest":496,"add_thick_line":400,"get_manifest":497,"draw_manifest_navigator":677,"approximate_up":658,"Menu_background_color":611,"on_handle":547,"Menu_border_color":612,"Menu_command_color":613,"Definitions":503,"Menu_highlight_color":614,"new_definition":671,"parent":677,"draw_menu_bar":641,"font":353,"add_hotkey_to_menu":616,"on.initialize":506,"Manifest_navigator":495,"A":507,"scale":7,"num_lines_for_manifest_navigator":676,"compute_layout":385,"copy_shape":396,"reset_manifest_navigator":621,"initialize_editor":678}
initialize_editor = function(obj)
if obj.w then
-- use an editor to wrap the text
local scaled_fontsize = scale(20)
local scaled_lineheight = math.floor(scaled_fontsize*1.3)
-- HACK: modify obj.editor.left after initialization
obj.editor = edit.initialize_state(Menu_bar_height + vy(obj.y), math.floor(vx(obj.x)), math.ceil(vx(obj.x+obj.w)), scaled_fontsize, scaled_lineheight)
obj.editor.left = obj.editor.left + Line_number_width*App.width(obj.editor.em)
obj.editor.lines = load_array(obj.data)
Text.redraw_all(obj.editor)
end
end