bool IsLineEmptyUpToEol() { var line = document.GetLineByNumber(location.Line); for (int j = offset; j < line.EndOffset; j++) { char ch = document.GetCharAt(j); if (!char.IsWhiteSpace(ch)) { return false; } } return true; }