/** * Whether a display line is a form feed line, for --form-feed: the raw * `\f` (-r) or its caret rendering. */ export declare const isFormFeed: (line: string) => boolean; /** * Caps a forward scroll at less's --form-feed stop: forw() checks each * newly printed bottom line (forwback.c:366) and breaks with the \f * line as the LAST visible row on screen. */ export declare function ffCapForward(content: string[], offset: number): number; /** * How far a backward move may go before a form feed stops it. * * less's back() prints each newly exposed line at the TOP and breaks * after one that starts with \f (forwback.c:444), so the form feed * ends up the first visible row. Jumps pass do_stop_on_form_feed * FALSE and never stop. * * @param content - Full content lines. * @param offset - Display rows the move wants. * @returns The rows it may actually take. */ export declare function ffCapBackward(content: string[], offset: number): number; export declare function lineForward(content: string[], offset: number, ignoreEOF?: boolean, attn?: boolean): void; /** * Scroll backward by the given offset. * * - Stops and rings bell at BOF, also disables `mode.INIT`. * - In chopped mode, moves by whole lines. * - In wrapped mode, moves by sub-rows within a line. * * @param content - Full content lines. * @param offset - Lines or sub-rows to scroll backward. */ export declare function lineBackward(content: string[], offset: number, attn?: boolean): number; /** * Scrolls backward past the beginning of the file (K, Y, ESC-b), like * less's forced back() padding blank lines above the first line. * * @param content - Full content lines. * @param offset - Lines or sub-rows to scroll backward. */ export declare function forceLineBackward(content: string[], offset: number, screenful?: boolean): void; /** * Scrolls forward by whole file lines (ESC-j), like less's to_newline * forw: wrapped sub-rows always land on a line boundary. * * @param content - Full content lines. * @param offset - File lines to move forward. */ export declare function newlineForward(content: string[], offset: number): void; /** * Scrolls backward by whole file lines (ESC-k), like less's to_newline * back. * * @param content - Full content lines. * @param offset - File lines to move backward. */ export declare function newlineBackward(content: string[], offset: number): void; /** Registers (or clears) the -e forward-at-EOF handler. */ export declare function onEofForward(fn: (() => boolean) | null): void; /** * Scrolls the view forward by a window size. * * - If `buffer` is a valid number, it overrides the default window size. * - Falls back to the -z scroll window (less's get_swindow) if `buffer` * is invalid. * - If `ignoreEOF` is `true`, allows scrolling beyond (END) without clamping. * * @param content - The full content to paginate. * @param buffer - A string array that represents the number of lines to scroll. * @param ignoreEOF - Whether to bypass EOF constraints during scrolling. */ export declare function windowForward(content: string[], buffer: string[], ignoreEOF?: boolean): void; /** * Moves the view backward by one window. * * - If `buffer` is a valid number, uses it as the offset. * - Otherwise, uses the -z scroll window (less's get_swindow). * * @param content - The full content as an array of lines. * @param buffer - A string array that represents the number of lines to scroll. */ export declare function windowBackward(content: string[], buffer: string[]): void; /** * Sets a custom window size using the given `buffer`, and scrolls forward. * * - If `buffer` is a valid number, updates `config.setWindow` with it. * - Then scrolls forward by the -z scroll window (less's get_swindow). * * @param content - The full content as an array of lines. * @param buffer - A string array that represents the number of lines to scroll. */ export declare function setWindowForward(content: string[], buffer: string[]): void; /** * Sets a custom window size using the given `buffer`, and scrolls backward. * * - If `buffer` is a valid number, updates `config.setWindow` with it. * - Then scrolls backward by the -z scroll window (less's get_swindow). * * @param content - The full content as an array of lines. * @param buffer - A string array that represents the number of lines to scroll. */ export declare function setWindowBackward(content: string[], buffer: string[]): void; /** * Sets a custom half-window size using the given `buffer`, and scrolls forward. * * - If `buffer` is a valid number, updates `config.setHalfWindow` with it. * - Then scrolls forward by `config.setHalfWindow` or falls back to * `config.halfWindow`. * * @param content - The full content as an array of lines. * @param buffer - A string array that represents the number of lines to scroll. */ export declare function setHalfWindowForward(content: string[], buffer: string[]): void; /** * Sets a custom half-window size using the given `buffer`, and scrolls * backward. * * - If `buffer` is a valid number, updates `config.setHalfWindow` with it. * - Then scrolls backward by `config.setHalfWindow` or falls back to * `config.halfWindow`. * * @param content - The full content as an array of lines. * @param buffer - A string array that represents the number of lines to scroll. */ export declare function setHalfWindowBackward(content: string[], buffer: string[]): void; export declare function setHalfScreenRight(buffer: string[]): void; /** * Scrolls left by buffer value or half screen width. * * @param buffer - Buffer containing scroll offset. */ export declare function setHalfScreenLeft(buffer: string[]): void; /** * Scrolls right to the last column displayed. * * - Shifts the view so the longest currently displayed line ends at the * right edge of the screen. * * @param content - Full content lines. */ export declare function lastCol(content: string[]): void; /** * Scrolls left to the first column. */ export declare function firstCol(): void;