BFD:BFD[
4.2] → [
5.30050:30091]
BFD:BFD[
4.2] → [
5.30050:30091]
BFD:BFD[
5.30091] → [
5.23288:23288]
B:BD[
5.24158] → [
6.10:37]
∅:D[
6.37] → [
5.24186:24908]
if State.mouse_down then
maxl,maxp = Text.mouse_pos(State)
else
maxl,maxp = State.cursor1.line,State.cursor1.pos
end
if Text.lt1({line=maxl, pos=maxp},
{line=minl, pos=minp}) then
minl,maxl = maxl,minl
minp,maxp = maxp,minp
end
-- check if intervals are disjoint
if line_index < minl then return nil,nil end
if line_index > maxl then return nil,nil end
if line_index == minl and bpos <= minp then return nil,nil end
if line_index == maxl and apos >= maxp then return nil,nil end
-- compare bounds more carefully (start inclusive, end exclusive)
local a_ge = Text.le1({line=minl, pos=minp}, {line=line_index, pos=apos})
local b_lt = Text.lt1({line=line_index, pos=bpos}, {line=maxl, pos=maxp})