Closed neilgoodman closed 11 months ago
I honestly have no memory of writing any of this code and sort of suspect I entered some sort of fugue state, so your guess is as good as mine. Thank you!
No problem. Thanks for all the work on the plugin! I've been finding it very helpful.
I believe this fixes issue #93.
To repro the bug:
Expected: Word count will be added to the current session total Actual: New words are ignored
I debugged the plugin using the test vault and noticed that for new scenes, the
startSceneCount
in theWritingSessionTracker.tickSession
method always ended up as null, which would cause thediff
variable to be set to 0. My fix is to just return thesceneCount
for this case.I think this is the root cause to #93, I did test using copy/paste and it seems to be fine, but I also only reviewed the code base for a few hours, so I could be missing something. This does resolve the session word count issue I've been running into though.