]> git.neil.brown.name Git - edlib.git/commit
linecount: ensure we start a visible beginning of document
authorNeilBrown <neil@brown.name>
Sat, 3 Jun 2023 00:49:37 +0000 (10:49 +1000)
committerNeilBrown <neil@brown.name>
Wed, 28 Jun 2023 05:40:21 +0000 (15:40 +1000)
commit82526daf1af2b5a2d925977b9813be202c00cfeb
tree75cb4f4ed011170b8cfa0b4fc71bea0076787db4
parentcfafe7fb84a6dd23d7cda07264c15a8d154dd23f
linecount: ensure we start a visible beginning of document

The document we are counting might be a 'view' and the early lines might
be clipped off.  So use doc:set-ref to move to the beginning as visible
from the focus.
Also simplify the code as two conditions each have exactly the same result.

Signed-off-by: NeilBrown <neil@brown.name>
lib-linecount.c