window: Bugfix click detection.

There were actually two off-by-one errors. Firstly, the counting of words was
ignoring the spaces between them, which is a scaling error; the more spaces,
the further wrong the calculation would be. And secondly, a single-character
error meant that the beginning of a word would be missed - a non-scaling error
but still an error. Both bugs are now fixed, and clicking should work now.