[bug #68209] Tabs make syntax error reporting incorrect
Rik <[email protected]> Fri, 17 Apr 2026 12:27:13 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
Update of bug #68209 (group octave):
Status: Confirmed => Fixed
Fixed Release: None => 12.1.0 (current default)
_______________________________________________________
Follow-up Comment #3:
This looks good. I simplified it by directly printing out 4 spaces at the
start of the line to account for the indicator ">>> ". With that change, the
indexing into the current line is much simpler.
- for (int i = 0; i < err_col + 3; i++)
- output_buf << ((i > 3 && curr_line[i - 4] == '\t') ? "\t" : "
");
+ output_buf << " "; // spacing to account for ">>> "
+ for (int i = 0; i < err_col - 1; i++)
+ output_buf << (curr_line[i] == '\t' ? "\t" : " ");
I checked it in at https://hg.savannah.gnu.org/hgweb/octave/rev/d78445f4819d.
Marking as Fixed and closing report.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68209>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaeJfYQAKCRCqLAuaBUf3 ThQuAP9J+28awvKasMM5xiDCGmz01FJNWIqBR0NgUP/q4DO70wEAq208WC3T4M72 f/AxbCoTUwo6M9uNLILidYd5EuVfLAo= =Gnv9 -----END PGP SIGNATURE-----