Skip to content

Commit

Permalink
Add some debug logging, TODO: remove
Browse files Browse the repository at this point in the history
  • Loading branch information
PEZ committed Apr 24, 2023
1 parent 0b9a2d6 commit 49981dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cursor-doc/paredit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1230,10 +1230,13 @@ export async function dragSexprBackward(
const cursor = doc.getTokenCursor(right);
const usePairs = isInPairsList(cursor, pairForms);
const currentRange = currentSexpsRange(doc, cursor, right, usePairs);
console.log('BOOM! currentRange', currentRange);
const newPosOffset = right - currentRange[0];
const backCursor = doc.getTokenCursor(currentRange[0]);
backCursor.backwardSexp();
console.log('BOOM! backCursor', backCursor);
const backRange = currentSexpsRange(doc, backCursor, backCursor.offsetStart, usePairs);
console.log('BOOM! backRange', backRange);
if (backRange[0] !== currentRange[0]) {
// there is a sexp to the left
const leftText = doc.model.getText(backRange[0], backRange[1]);
Expand Down

0 comments on commit 49981dc

Please sign in to comment.