ensime/ensime-src — pull request #11 by edani (2014-02-17 22:48:47+00:00)
Title: Fix offsets for DOS mode

This is the last of my pull requests for a while.

The translation of file offsets for DOS-style EOL didn't quite work. This change:
- makes ensime-internalize-offset actually work. It does a binary search until (ensime-externalize-offset at the current point matches the desired offset). It would be possible to accelerate the search by taking the beginning-of-line and end-of-line into account but I think the current code is good enough.

- adds "ensime-internalize-offset-for-file" for when we need to do the conversion for a file not being visited. The one thing that could be improved, is that files may be loaded several times over.

- uses ensime-internalize-offset everywhere I found an offset adjustment (well mostly everywhere. I only fixed ensime.el, I'll need to do the rest later).