adobe/brackets — pull request #7775 by njx (2014-05-07 19:41:52+00:00)
Title: Make getModeForRange() behave like getModeForSelection() when mode is not mixed

For #7764. This isn't the cleanest fix, but it exactly preserves the existing behavior for the case where `getModeForRange()` is called from `getModeForSelection()`, while fixing the behavior for the case where `getModeForRange()` is called directly from the commenting operations in EditorCommandHandlers.

The EditorCommandHandlers unit tests all pass with this fix.

@peterflynn /cc @TomMalbran