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
With CodeLoc columns now consistently byte-based, the caret display logic in crates/monty/src/exception_public.rs:228-238 computes positions using byte offsets (line.len(), trimmed.len(), self.start.column). For lines containing multi-byte UTF-8 characters before the error location, " ".repeat(caret_start) generates ASCII spaces based on byte counts rather than display width, which can cause visual misalignment. This is a pre-existing issue (the old mixed byte/character computation was also wrong for non-ASCII) and is not introduced by this PR. Fixing it properly would require a display-width-aware calculation.
(Refers to lines 228-238)
Was this helpful? React with π or π to provide feedback.
π© Caret display uses byte-based columns β may misalign for non-ASCII on same line
With
CodeLoccolumns now consistently byte-based, the caret display logic incrates/monty/src/exception_public.rs:228-238computes positions using byte offsets (line.len(),trimmed.len(),self.start.column). For lines containing multi-byte UTF-8 characters before the error location," ".repeat(caret_start)generates ASCII spaces based on byte counts rather than display width, which can cause visual misalignment. This is a pre-existing issue (the old mixed byte/character computation was also wrong for non-ASCII) and is not introduced by this PR. Fixing it properly would require a display-width-aware calculation.(Refers to lines 228-238)
Was this helpful? React with π or π to provide feedback.
Originally posted by @devin-ai-integration[bot] in #342 (comment)