Merge lines.love

[?]
Sep 20, 2023, 9:20 PM
5CDHNEKR6O25FXWMQLFMEYGBGYCAVAQRP4GTRDYWINUBBNNXUMNAC

Dependencies

  • [2] CIK3U5S6 Merge lines.love
  • [3] 656FM555 bugfix: clear selection when clicking above or below lines
  • [4] 2L5MEZV3 experiment: new edit namespace
  • [5] GFXWHTE6 mouse wheel support
  • [6] QJISOCHJ some temporary logging to catch a bug
  • [7] LF7BWEG4 group all editor globals
  • [8] 6XCJX4DZ bugfix: inscript's bug
  • [9] Z5WOBP27 Merge lines.love
  • [10] OWE64YJ2 Merge lines.love
  • [11] LNUHQOGH start passing in Editor_state explicitly
  • [12] 7FPELAZB ah, I see the problem

Change contents

  • replacement in edit.lua at line 296
    [4.5460][4.5460:5509]()
    -- still here? click is below all screen lines
    [4.5460]
    [4.5509]
    -- still here? mouse press is below all screen lines
  • edit in edit.lua at line 318
    [4.6334]
    [4.6334]
    if y < State.top then
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    edit.clean_up_mouse_press(State)
    return
    end
  • replacement in edit.lua at line 333
    [4.6805][4.6805:7249]()
    if State.mousepress_shift then
    if State.old_selection1.line == nil then
    State.selection1 = State.old_cursor1
    else
    State.selection1 = State.old_selection1
    end
    end
    State.old_cursor1, State.old_selection1, State.mousepress_shift = nil
    if eq(State.cursor1, State.selection1) then
    State.selection1 = {}
    end
    break
    [4.6805]
    [4.7249]
    edit.clean_up_mouse_press(State)
    return
  • edit in edit.lua at line 338
    [4.7279]
    [4.7279]
    -- still here? mouse release is below all screen lines
    State.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)
    edit.clean_up_mouse_press(State)
  • edit in edit.lua at line 343
    [4.7474]
    [4.7474]
    end
    end
    function edit.clean_up_mouse_press(State)
    if State.mousepress_shift then
    if State.old_selection1.line == nil then
    State.selection1 = State.old_cursor1
    else
    State.selection1 = State.old_selection1
    end
    end
    State.old_cursor1, State.old_selection1, State.mousepress_shift = nil
    if eq(State.cursor1, State.selection1) then
    State.selection1 = {}
  • edit in edit.lua at line 629
    [4.17561][2.286:286](),[4.2969][3.3075:3135](),[4.2969][3.3075:3135](),[4.1870][3.3603:3753](),[4.1870][3.3603:3753](),[4.3165][3.3365:3602](),[4.3165][3.3365:3602](),[4.9624][3.3136:3364](),[4.9624][3.3136:3364](),[4.2768][3.2908:3074](),[4.2768][3.2908:3074](),[4.2288][3.2852:2907](),[4.2288][3.2852:2907]()
    edit.clean_up_mouse_press(State)
    return
    State.old_cursor1, State.old_selection1, State.mousepress_shift = nil
    if eq(State.cursor1, State.selection1) then
    State.selection1 = {}
    end
    end
    end
    function edit.clean_up_mouse_press(State)
    if State.mousepress_shift then
    if State.old_selection1.line == nil then
    State.selection1 = State.old_cursor1
    else
    State.selection1 = State.old_selection1
    end
    -- still here? mouse release is below all screen lines
    State.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)
    edit.clean_up_mouse_press(State)
    if y < State.top then
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    edit.clean_up_mouse_press(State)
    return
    end
    -- still here? mouse press is below all screen lines
  • resolve order conflict in edit.lua at line 629
    [4.17561]