MCPcopy Create free account
hub / github.com/continuedev/continue / getBeforeCursorPos

Function getBeforeCursorPos

extensions/vscode/src/util/editLoggingUtils.ts:54–64  ·  view source on GitHub ↗
(range: Range, activePos: Position)

Source from the content-addressed store, hash-verified

52};
53
54export const getBeforeCursorPos = (range: Range, activePos: Position) => {
55 // whichever side of the range isn't active is the before position
56 if (
57 range.start.line === activePos.line &&
58 range.start.character === activePos.character
59 ) {
60 return range.end as Position;
61 } else {
62 return range.start as Position;
63 }
64};
65
66const getWorkspaceDirUri = async (event: vscode.TextDocumentChangeEvent) => {
67 const workspaceFolder = vscode.workspace.getWorkspaceFolder(

Callers 1

handleTextDocumentChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected