Python: fix inconsistency

Since we calculate the end column by offset,
we must believ that the end line is the same
as the start line.
This commit is contained in:
Rasmus Lerchedahl Petersen
2023-09-26 21:02:14 +02:00
parent db95eade64
commit 8ade9ed164

View File

@@ -257,8 +257,9 @@ module Impl implements RegexTreeViewSig {
) {
not exists(this.getPart(_)) and
exists(int re_start, int prefix_len | prefix_len = re.getPrefix().length() |
re.getLocation().hasLocationInfo(filepath, startline, re_start, endline, _) and
re.getLocation().hasLocationInfo(filepath, startline, re_start, _, _) and
startcolumn = re_start + start + prefix_len and
endline = startline and
endcolumn = re_start + end + prefix_len - 1
/* inclusive vs exclusive */
)