Skip to content

Commit f5caca0

Browse files
committedSep 7, 2024·
Return false from selectParentSyntax when it makes no changes
FIX: Make `selectParentSyntax` return false when it doesn't change the selection. Issue codemirror/dev#1436
1 parent cf29578 commit f5caca0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/commands.ts

+1
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ export const selectParentSyntax: StateCommand = ({state, dispatch}) => {
415415
}
416416
return range
417417
})
418+
if (selection.eq(state.selection)) return false
418419
dispatch(setSel(state, selection))
419420
return true
420421
}

0 commit comments

Comments
 (0)
Please sign in to comment.