Fix off-by-one error for resolving document column to symbol column

This commit is contained in:
Jacob Dufault 2017-05-16 23:05:12 -07:00
parent 59a077d8a9
commit c5f29c277b

View File

@ -95,11 +95,11 @@ Range::Range(const char* encoded) {
bool Range::Contains(int line, int column) const {
if (line == start.line && line == end.line)
return column >= start.column && column <= end.column;
return column >= start.column && column < end.column;
if (line == start.line)
return column >= start.column;
if (line == end.line)
return column <= end.column;
return column < end.column;
if (line > start.line && line < end.line)
return true;
return false;