The problem is that we do the work for side B only when we get through the side A gate.
5Z7WU65HS47ABW62BBE4AEYZNR44O4KT6RBN2TIYXJW4577EB5RQC
FLX77WI6PVTKLACN2LDU4RGX5CHM5YGOE4SVQQMAKGJTBYXD7F7QC
XLG3ODIKY5BWRLBMDKXRUDC5GVAKNA4GUS7CQ7UJJHYRNXWHB6CAC
GTZLDCKDIA2RQTTZMNCHSP7USVFEOMOJNUH7WKZW7YRJ7LXNWYOAC
LWTLEHXFIC3DYOHZJ2DXIOAZZSU67WHO2F4XCR4R76E3MAK3UUMQC
K3M447T3CSGWDNTPKVYK47JPDCS4S4WLTKEKWPNMIDN6TCAIQULAC
BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC
HTZ3WRQHWJHMRR354RCPYK3L7OB5KRDJPJEL3Q4Y7IVNCYN2TSJQC
UDQBOVKKGKAYBTGCEOM33P3XXVJIOGO4DPKTDUBQDOCLQJKAFEYQC
ILOA5BYFTQKBSHLFMMZUVPQ2JXBFJD62ERQFBTDK2WSRXUN525VQC
CG5PH4DWFEUEICYJAPPGAMDCCTOGUB7475IC5IFKSB4ADL2KCJZQC
LNUHQOGHIOFGJXNGA3DZLYEASLYYDGLN2I3EDZY5ANASQAHCG3YQC
MD3W5IRAC6UQALQE4LJC52VQNDO3I3HXF3XE2XHDABXBYJBUVAXQC
2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC
YEI2GCL24TW7C7OAMCXJVKWIUK27O6JIA3OGM6CD2C5C3OBJDKZQC
num_screen_lines = num_screen_lines + #line_cache.screen_line_starting_posB - Text.screen_line_indexB(line_cache.screen_line_starting_posB, line_cache.startposB) -- no +1; first screen line of B side overlaps with A side
--? print('B:', x, #line_cache.screen_line_starting_posB)
if line_cache.startposB then
num_screen_lines = num_screen_lines + #line_cache.screen_line_starting_posB - Text.screen_line_indexB(line_cache.screen_line_starting_posB, line_cache.startposB) -- no +1; first screen line of B side overlaps with A side
else
num_screen_lines = num_screen_lines + #line_cache.screen_line_starting_posB - Text.screen_line_indexB(line_cache.screen_line_starting_posB, 1) -- no +1; first screen line of B side overlaps with A side
end