idea: set recent_mouse on mouse events
[?]
Jun 1, 2023, 7:57 PM
MRA2Y3EEDV73ZFMWL3EBUXAWZYQSDK4E5FWISWHHJZ2YXTYYYTBACDependencies
- [2]
7FPELAZBah, I see the problem - [3]
UHB4GARJleft/right margin -> left/right coordinates - [4]
FKNXK2OAswitch to line index in a function - [5]
QCPXQ2E3add state arg to a few functions - [6]
LNUHQOGHstart passing in Editor_state explicitly - [7]
PK5U572Cdrop some extra args - [8]
S2MISTTMadd state arg to a few functions - [9]
LF7BWEG4group all editor globals - [10]
LXTTOB33extract a couple of files - [11]
4CXVIEBSadd args to some functions - [12]
MXA3RZYKdeduce left/right from state where possible - [13]
QJISOCHJsome temporary logging to catch a bug - [14]
2L5MEZV3experiment: new edit namespace
Change contents
- replacement in select.lua at line 72[3.388]→[3.45902:45938](∅→∅),[3.1061]→[3.45902:45938](∅→∅),[3.4078]→[3.45902:45938](∅→∅),[3.45902]→[3.45902:45938](∅→∅),[3.45938]→[3.1062:1135](∅→∅)
local time = love.timer.getTime()if State.recent_mouse.time and State.recent_mouse.time > time-0.1 thenif State.recent_mouse.time and State.recent_mouse.time > Current_time-0.1 then - replacement in select.lua at line 76
State.recent_mouse.time = timeState.recent_mouse.time = Current_time - replacement in edit.lua at line 252
print_and_log(('edit.mouse_press: selection now %d,%d'):format(State.selection1.line, State.selection1.pos))State.recent_mouse = {time=Current_time, line=State.selection1.line, pos=State.selection1.pos} - edit in edit.lua at line 289
State.recent_mouse = {time=Current_time, line=State.cursor1.line, pos=State.cursor1.pos}