Haacked/Encourage — pull request #25 by jaredpar (2014-07-24 06:30:23+00:00)
Title: Use document buffer

An ITextView can have multiple ITextBuffer instances associated with it.
When looking for the main ITextDocument associated with an ITextView it
should always be done through the DocumentBuffer. The previous code was
using ITextView::TextBuffer which is equivalent to the EditBuffer.

The reason this worked in standard files (like a .cs) is that the
EditBuffer and DocumentBuffer are the same value. In razor files the
view is much more complex and the EditBuffer is actually a rather
complicated projection buffer (instance of IProjectionBuffer). Hence it
had no associated document.

closes #21