Make writing stats word calculation more intuitive #659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The session log file actually logs the total word count for each entry, not the change in words. The writing stats dialog calculates the difference and list the change in word count per row. However, when the negative word counts are filtered out, the difference displayed in the next positive word count row is calculated from the difference from before the skipped row, so the total count may no longer actually be positive.
Example:
Day 1: +2000 words
Day 2: -500 words
Day 3: +1500 words
Filtering out the negative would then show:
Day 1: +2000 words
Day 3: +1000 words
With this change, it instead shows:
Day 1: +2000 words
Day 3: +1500 words
This makes more sense, but it also means that the sum of rows no longer matches the total word count if negative counts are excluded. But that is sort of expected, so not really an issue.