make a function oblivious to line data structure
[?]
Jul 17, 2022, 4:21 PM
EM276IH3NFWRAVNH4MLH43KOEXPZSX4K35CNVRSI3NGZHHUZQPBQCDependencies
- [2]
ODLKHO7Bswitch to line index in a function - [3]
UV4EWOLYadd args to some functions - [4]
QCPXQ2E3add state arg to a few functions - [5]
MXA3RZYKdeduce left/right from state where possible - [6]
CPZGQT72go through and fix similar issues - [7]
BOFNXP5Gclicking now moves the cursor even on long, wrapped lines - [8]
MYC7XR5Qbugfix: lines that aren't drawn from the start - [9]
IWYLK45Kclicking to the right of a line within line width - [10]
LF7BWEG4group all editor globals - [11]
HYEAFRZ2split mouse_pressed events between Text and Drawing - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- replacement in text.lua at line 702
return y < line.starty + State.line_height*(#line.screen_line_starting_pos - Text.screen_line_index(line, line.startpos) + 1)return y < line.starty + State.line_height*(#line.screen_line_starting_pos - Text.screen_line_index(line.screen_line_starting_pos, line.startpos) + 1) - replacement in text.lua at line 714
local start_screen_line_index = Text.screen_line_index(line, line.startpos)local start_screen_line_index = Text.screen_line_index(line.screen_line_starting_pos, line.startpos) - replacement in text.lua at line 752
function Text.screen_line_index(line, pos)for i = #line.screen_line_starting_pos,1,-1 doif line.screen_line_starting_pos[i] <= pos thenfunction Text.screen_line_index(screen_line_starting_pos, pos)for i = #screen_line_starting_pos,1,-1 doif screen_line_starting_pos[i] <= pos then