Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix counting of context lines (don't count lines w/no chars included) #3405

Closed
wants to merge 1 commit into from

Conversation

sqs
Copy link
Member

@sqs sqs commented Mar 14, 2024

In the context summary in chat, ✨ Context: 56 lines from 5 files previously counted lines even if no characters on that line were included. For example, a range from line 5 character 10 to line 7 character 0, which is rendered as 5-6, was counted as 3 lines. It should be counted as 2 lines.

Test plan

CI

In the context summary in chat, `✨ Context: 56 lines from 5 files` previously counted lines even if no characters on that line were included. For example, a range from line 5 character 10 to line 7 character 0, which is rendered as `5-6`, was counted as 3 lines. It should be counted as 2 lines.
@sqs sqs requested a review from a team March 14, 2024 05:42
@sqs
Copy link
Member Author

sqs commented Mar 14, 2024

Nevermind. Will land as part of #3287. I initially tried to extract this from #3287 here, but I found that there were other bugs elsewhere in the code (a few different places where we parsed the range strings differently) that meant it would be a more involved change.

@sqs sqs closed this Mar 14, 2024
@sqs sqs deleted the sqs/file-line-counts branch March 14, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants