// Comments in English
import type { EditorSelection } from "@codemirror/state";
export function selectionIntersects(sel: EditorSelection, from: number, to: number) {
  for (const r of sel.ranges) if (r.from <= to && r.to >= from) return true;
  return false;
}
