[BUG] `rich.traceback`: incorrect calculation of start and end of underlined text due to tab indentation
- [x] I've checked docs and closed issues for possible solutions.
- [x] I can't find my issue in the FAQ.
Describe the bug
Rich incorrectly underlines the code during drawing of a traceback (it highlights the expression or statement that caused the exception) when the code is tab-indented, due to what i believe is miscalculation of the '\t' character as being 1-space indentation, but displaying it as 4-space indentation which causes the desync of the underline.
Example of incorrectly drawn line (the line is 6 characters too much to the left - because 2 tabs = 2 * 3 missed spaces):
Platform Windows Terminal on Windows 10
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the FAQ if you haven't done so already.
Rich was created by Will McGugan. Consider sponsoring Will's work on Rich.
This is an automated reply, generated by FAQtory