]> git.neil.brown.name Git - edlib.git/commitdiff
render-lines: remove obvious error
authorNeilBrown <neil@brown.name>
Fri, 21 Jul 2023 01:08:23 +0000 (11:08 +1000)
committerNeilBrown <neil@brown.name>
Fri, 21 Jul 2023 01:09:38 +0000 (11:09 +1000)
There can be no justification to multiply by cw twice.

This doesn't affect display-ncurses but is problematic for x11

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

index 711d7cbcb23ea8db31bdea40dbc318a755ae7135..855f2ffffb23a09a766cbf2cb37205eb63f3246a 100644 (file)
@@ -1054,7 +1054,7 @@ static int revalidate_start(struct rl_data *rl safe,
                        while (hp->cx < prefix_len &&
                               rl->shift_left > 0 &&
                               shifts++ < 1000 &&
-                              hp->cx + curs_width * 8*curs_width < p->w) {
+                              hp->cx + curs_width * 8 < p->w) {
                                int shift = 8 * curs_width;
                                if (shift > rl->shift_left)
                                        shift = rl->shift_left;