/** One tag match, like tags.c's struct tag. */ export interface Tag { file: string; /** 1-based line number; 0 when the tag uses a search pattern. */ linenum: number; pattern: string | null; /** True when the pattern ended with `$` (must match to EOL). */ endline: boolean; } /** Registers a seekable input's complete-file tag jump. */ export declare function onSourceTagJump(jump: ((tag: Tag) => boolean) | null): void; /** Lets the active source handle the current tag before array lookup. */ export declare function jumpSourceTag(): boolean; /** The number of loaded tag matches, like ntags(). */ export declare const ntags: () => number; /** The 1-based current tag sequence, like curr_tag(). */ export declare const currTag: () => number; /** The current tag's file name, for the jump. */ export declare const currTagFile: () => string | null; /** Forgets the tag list, like cleantags(). */ export declare function resetTags(): void; /** Records a startup -t, to be resolved once option scanning ends. */ export declare function setPendingTag(name: string): void; /** * Resolves a startup -t, the way main.c does after scan_option: look the * tag up and ask the pager to jump, reporting less's message on failure. */ export declare function resolvePendingTag(): string | null; /** Asks the pager to jump to the current tag. */ export declare function requestTagJump(): void; /** Registers the pager's tag jump, running one queued by $LESS -t. */ export declare function onTagJump(fn: (() => void) | null): void; /** * Loads the matches for a tag, like tags.c's findtag: the ctags file * named by -T, or global(1) output for the GTAGS-family names. * * @param tag - The tag to look up. * @returns null on success, or the less error message. */ export declare function findTag(tag: string): string | null; /** * Steps through the tag matches (t / T), like nexttag/prevtag: each * step past either end stays put and reports null, non-circular. * * @param delta - 1 for the next match, -1 for the previous. * @param n - How many matches to step. * @returns The landed tag, or null when the list ran out. */ export declare function stepTag(delta: 1 | -1, n: number): Tag | null; /** * Finds the current tag's row in the opened file, like ctagsearch: a * line-number tag jumps directly, a pattern tag scans for a line * starting with the (possibly truncated) pattern. * * @param content - The tag file's lines. * @returns The 0-based row, or null when the tag is not found. */ export declare function tagRow(content: string[]): number | null;