/** * less's position table (position.c): one entry per screen row, holding * where that row STARTS. * * less's screen is not a top plus a wrapping rule - it is this array. * `position(sindex)` reads it, `add_forw_pos` drops the front and * appends, `add_back_pos` prepends, `pos_clear` empties it. Because * every row carries its own start, rows above and below a scroll seam * can sit on different grids, a row can begin mid-boundary, and a * width change simply regenerates the extents from the same starts. * Our `(row, subRow)` top could express none of that, which is what * config.subShift and config.subAnchor were bolted on to fake. * * Offsets count DISPLAY CHARACTERS, the space the layout's rowStart * indexes - never string indices, which differ on any styled line * because the layout keeps its escape codes in a separate list. */ export interface ScreenRow { /** Index into the display content. */ row: number; /** Display-character offset into that line where this row begins. */ offset: number; /** * Where it ends. less reads this off the NEXT entry, but the bottom * row has no next one and a row the seam cut short must stay short * there too, so each entry carries its own. */ end: number; } export declare function buildScreen(lineAt: (row: number) => string, count: number, cap: number): ScreenRow[]; /** * The drawn text of one table entry: from its own start to where the * NEXT entry starts, so a row the table cut short stays short. */ export declare function rowText(cell: ScreenRow, line: string): string;