MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / findCurrentVisualLine

Method findCurrentVisualLine

packages/pi-tui/src/components/editor.ts:1850–1854  ·  view source on GitHub ↗

* Find the visual line index for the current cursor position.

(
		visualLines: Array<{ logicalLine: number; startCol: number; length: number }>,
	)

Source from the content-addressed store, hash-verified

1848 * Find the visual line index for the current cursor position.
1849 */
1850 private findCurrentVisualLine(
1851 visualLines: Array<{ logicalLine: number; startCol: number; length: number }>,
1852 ): number {
1853 return this.findVisualLineAt(visualLines, this.state.cursorLine, this.state.cursorCol);
1854 }
1855
1856 private moveCursor(deltaLine: number, deltaCol: number): void {
1857 this.lastAction = null;

Callers 4

isOnFirstVisualLineMethod · 0.95
isOnLastVisualLineMethod · 0.95
moveCursorMethod · 0.95
pageScrollMethod · 0.95

Calls 1

findVisualLineAtMethod · 0.95

Tested by

no test coverage detected