KamWithK / exSTATic

Zero effort language learning reading tracker with graphs and stats
GNU General Public License v3.0
93 stars 7 forks source link

Deleting huge chunks of text seems to remove more characters than intended. #26

Open anadia7 opened 4 months ago

anadia7 commented 4 months ago

After I've erroneously activated skip mode and gotten a bazillion characters thrown into exstatic at once, when I delete said lines I end up with way lower character count than I actually started with, ruining my stats for the day.

For today, I accidentally added around 11k characters in three lines, and then deleted them. And through my texthooker log I can see that I had read roughly 14k characters read today, yet I am left with exstatic claiming I have read only 900 after deleting those three lines.

KamWithK commented 2 months ago

I am not sure why it is happening, and it really sucks! A long while ago I noticed these issues, wrote some fixes, and thought these problems were finally fixed - but maybe not completely :(

Very hard to debug this type of problem too, as it doesn't always happen, it rarely happens significantly enough to actually be noticeable at all

I really think proper typed code and automated testing are important, before trying to tackle these type of edge cases so I will leave this open but I don't think it will be "solved" soon