mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 15:45:08 +00:00
position: support line numbers larger than INT16_MAX (but <= UINT16_MAX) (#553)
This commit is contained in:
parent
a2ecd9a8f0
commit
e373f9ed97
@ -47,7 +47,7 @@ Range Range::fromString(const std::string &encoded) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Range::contains(int line, int column) const {
|
bool Range::contains(int line, int column) const {
|
||||||
if (line > INT16_MAX)
|
if (line > UINT16_MAX)
|
||||||
return false;
|
return false;
|
||||||
Pos p{(uint16_t)line, (int16_t)std::min<int>(column, INT16_MAX)};
|
Pos p{(uint16_t)line, (int16_t)std::min<int>(column, INT16_MAX)};
|
||||||
return !(p < start) && p < end;
|
return !(p < start) && p < end;
|
||||||
|
Loading…
Reference in New Issue
Block a user