function find(session, needle, dir) {
    search.$options.wrap = true;
    search.$options.needle = needle;
    search.$options.backwards = dir == -1;
    return search.find(session);
}
@typedef {import("./anchor").Anchor} Anchor
@typedef {import("../ace-internal").Ace.Point} Point
@typedef {import("../ace-internal").Ace.ScreenCoordinates} ScreenCoordinates