Hmmm... `indexFromPos()` doesn't look super efficient -- in CM, it appears to walk the document "chunk" structure from the start to the pos in order to accumulate an offset (three times, in the case of `posWithinRange()`).  Since the mouseMove() code gets hit a lot it might be better to avoid that.  I suppose I could just move my implementation into `posWithinRange()` and then it'd be (mostly) shared...