fix(fun/wcl): Count words correctly if file starts with whitespace

This commit is contained in:
Vincent Ambo 2020-01-28 21:24:51 +00:00
parent 1ba3d1cf97
commit 39b0176026

View file

@ -21,9 +21,10 @@
(counting is-newline into newlines)
;; Count every "word", unless the preceding character already
;; was a space.
;; was a space or we are at the beginning of the file.
(when (or (eq space previous-byte)
(eq newline previous-byte))
(eq newline previous-byte)
(not previous-byte))
(next-iteration))
(counting (or is-newline (eq space byte))