Merge lines.love
[?]
Sep 20, 2023, 9:20 PM
5CDHNEKR6O25FXWMQLFMEYGBGYCAVAQRP4GTRDYWINUBBNNXUMNACDependencies
- [2]
CIK3U5S6Merge lines.love - [3]
656FM555bugfix: clear selection when clicking above or below lines - [4]
2L5MEZV3experiment: new edit namespace - [5]
GFXWHTE6mouse wheel support - [6]
QJISOCHJsome temporary logging to catch a bug - [7]
LF7BWEG4group all editor globals - [8]
6XCJX4DZbugfix: inscript's bug - [9]
Z5WOBP27Merge lines.love - [10]
OWE64YJ2Merge lines.love - [11]
LNUHQOGHstart passing in Editor_state explicitly - [12]
7FPELAZBah, I see the problem
Change contents
- replacement in edit.lua at line 296
-- still here? click is below all screen lines-- still here? mouse press is below all screen lines - edit in edit.lua at line 318
if y < State.top thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}edit.clean_up_mouse_press(State)returnend - replacement in edit.lua at line 333
if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1endendState.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}endbreakedit.clean_up_mouse_press(State)return - edit in edit.lua at line 338
-- still here? mouse release is below all screen linesState.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
endendfunction edit.clean_up_mouse_press(State)if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1endendState.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.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)returnState.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}endendendfunction edit.clean_up_mouse_press(State)if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1end-- still here? mouse release is below all screen linesState.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 thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}edit.clean_up_mouse_press(State)returnend-- still here? mouse press is below all screen lines - resolve order conflict in edit.lua at line 629[4.17561]