You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): use byte offsets for position reporting in raw-scoped script rules
Script rules with `scope: raw` return begin/end byte offsets in their
match arrays, but AddAlert ignores these and performs a text search via
FindLoc/initialPosition to determine the alert position. When the
matched text appears multiple times in the document, this always reports
the position of the first occurrence rather than the intended one.
Add locFromByteOffset() to compute line:column directly from the byte
offsets the script provides, bypassing the text-search path. The new
path activates when the alert carries valid byte offsets within a
raw-scope block, falling back to the existing FindLoc path otherwise.
Relates to #869, #272.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments