mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 18:00:26 +00:00
Fix off-by-one error for resolving document column to symbol column
This commit is contained in:
parent
59a077d8a9
commit
c5f29c277b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user