From b436ae789c6b0b28c25421c11005b8e48d562f33 Mon Sep 17 00:00:00 2001 From: "Jade (Rose) Rowland" Date: Thu, 22 Jan 2026 00:25:28 -0500 Subject: [PATCH] rm dead code --- packages/codemirror/labelJump.mjs | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/packages/codemirror/labelJump.mjs b/packages/codemirror/labelJump.mjs index c0a0c8e59..bdbaa55cd 100644 --- a/packages/codemirror/labelJump.mjs +++ b/packages/codemirror/labelJump.mjs @@ -1,6 +1,7 @@ import { EditorSelection } from '@codemirror/state'; import { SearchCursor } from '@codemirror/search'; -import { EditorView } from '@codemirror/view'; + +const COMMENT_STRING = '//'; function getCharacterPositions(state, character) { const cursor = new SearchCursor(state.doc, character); @@ -11,27 +12,6 @@ function getCharacterPositions(state, character) { return characterPositions; } -// function jumpToNextCharacter(view,character, direction = 1){ -// const { state, dispatch } = view; -// const pos = state.selection.main.head; -// let jumpPos; -// const characterPositions = getCharacterPositions(state, character) -// if (!characterPositions.length) { -// return false; -// } -// if (direction > 0) { -// jumpPos = characterPositions.find((x) => x > pos + 1) ?? characterPositions.at(0); // Loop back around for convenience -// } else { -// jumpPos = characterPositions.reverse().find((x) => x < pos + 1) ?? characterPositions.at(0); -// } - -// if (jumpPos == null) { -// return false; -// } -// const selection = EditorSelection.cursor(jumpPos - 1); -// } - -const COMMENT_STRING = '//'; export function jumpToNextCharacter(view, character, direction = 1) { const { state, dispatch } = view; const pos = state.selection.main.head;