diff --git a/src/utils/Cursor.ts b/src/utils/Cursor.ts index 6968ff473..b656687e1 100644 --- a/src/utils/Cursor.ts +++ b/src/utils/Cursor.ts @@ -51,26 +51,6 @@ export function getLastKill(): string { return killRing[0] ?? '' } -export function getKillRingItem(index: number): string { - if (killRing.length === 0) return '' - const normalizedIndex = - ((index % killRing.length) + killRing.length) % killRing.length - return killRing[normalizedIndex] ?? '' -} - -export function getKillRingSize(): number { - return killRing.length -} - -export function clearKillRing(): void { - killRing = [] - killRingIndex = 0 - lastActionWasKill = false - lastActionWasYank = false - lastYankStart = 0 - lastYankLength = 0 -} - export function resetKillAccumulation(): void { lastActionWasKill = false } @@ -83,10 +63,6 @@ export function recordYank(start: number, length: number): void { killRingIndex = 0 } -export function canYankPop(): boolean { - return lastActionWasYank && killRing.length > 1 -} - export function yankPop(): { text: string start: number @@ -130,7 +106,7 @@ export function resetYankState(): void { */ // Pre-compiled regex patterns for Vim word detection (avoid creating in hot loops) -export const VIM_WORD_CHAR_REGEX = /^[\p{L}\p{N}\p{M}_]$/u +const VIM_WORD_CHAR_REGEX = /^[\p{L}\p{N}\p{M}_]$/u export const WHITESPACE_REGEX = /\s/ // Exported helper functions for Vim character classification