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

Method moveWordForwards

packages/pi-tui/src/components/editor.ts:2128–2147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2126 }
2127
2128 private moveWordForwards(): void {
2129 this.lastAction = null;
2130 const currentLine = this.state.lines[this.state.cursorLine] || "";
2131
2132 // If at end of line, move to start of next line
2133 if (this.state.cursorCol >= currentLine.length) {
2134 if (this.state.cursorLine < this.state.lines.length - 1) {
2135 this.state.cursorLine++;
2136 this.setCursorCol(0);
2137 }
2138 return;
2139 }
2140
2141 this.setCursorCol(
2142 findWordForward(currentLine, this.state.cursorCol, {
2143 segment: (text) => this.segment(text, "word"),
2144 isAtomicSegment: isPasteMarker,
2145 }),
2146 );
2147 }
2148
2149 // Slash menu only allowed on the first line of the editor
2150 private isSlashMenuAllowed(): boolean {

Callers 2

handleInputMethod · 0.95
deleteWordForwardMethod · 0.95

Calls 3

setCursorColMethod · 0.95
segmentMethod · 0.95
findWordForwardFunction · 0.90

Tested by

no test coverage detected