MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / upLogicalLine

Method upLogicalLine

source code/utils/Cursor.ts:513–533  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

511 }
512
513 upLogicalLine(): Cursor {
514 const { start: currentStart } = this.getLogicalLineBounds()
515
516 // At first line - stay at beginning
517 if (currentStart === 0) {
518 return new Cursor(this.measuredText, 0, 0)
519 }
520
521 // Calculate target column position
522 const currentColumn = this.offset - currentStart
523
524 // Find previous line bounds
525 const prevLineEnd = currentStart - 1
526 const prevLineStart = this.findLogicalLineStart(prevLineEnd)
527
528 return this.createCursorWithColumn(
529 prevLineStart,
530 prevLineEnd,
531 currentColumn,
532 )
533 }
534
535 downLogicalLine(): Cursor {
536 const { start: currentStart, end: currentEnd } = this.getLogicalLineBounds()

Callers 2

applySingleMotionFunction · 0.80
upOrHistoryUpFunction · 0.80

Calls 3

getLogicalLineBoundsMethod · 0.95
findLogicalLineStartMethod · 0.95

Tested by

no test coverage detected