]> git.neil.brown.name Git - edlib.git/commitdiff
render-format: when at end-of-file, we aren't at start-of-line.
authorNeilBrown <neil@brown.name>
Mon, 23 Nov 2015 06:14:09 +0000 (17:14 +1100)
committerNeilBrown <neil@brown.name>
Mon, 23 Nov 2015 06:14:09 +0000 (17:14 +1100)
This is the one possible point that isn't start-of-line, so
be careful of it.

Signed-off-by: NeilBrown <neil@brown.name>
render-format.c

index fec36731c082c1eb762468a81aebabdcaef8d994..2f3a9e696f00f9acd5cec8eacf72e8c1b8751a40 100644 (file)
@@ -153,7 +153,7 @@ DEF_CMD(render_line_prev)
        struct mark *m = ci->mark;
        struct doc *d = (*ci->pointp)->doc;
 
-       if (RPT_NUM(ci) == 0)
+       if (RPT_NUM(ci) == 0 && doc_following(d, m) != WEOF)
                /* always at start-of-line */
                return 1;
        if (mark_prev(d, m) == WEOF)