Follow-up Comment #4, bug #60673 (project groff):

Heads up.

It looks like my planned changes to address #60189 are going to affect this.

You may want to play around with this.


diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 4af8741e1..5e7017b8f 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2053,6 +2053,10 @@ static node *node_list_reverse(node *n)
 static void distribute_space(node *n, int nspaces, hunits desired_space,
                             int force_reverse = 0)
 {
+  if (desired_space.is_zero() || nspaces == 0) {
+    debug("distribute_space(): no work to do");
+    return;
+  }
   static int reverse = 0;
   if (force_reverse || reverse)
     n = node_list_reverse(n);
@@ -2070,7 +2074,6 @@ static void distribute_space(node *n, int nspaces,
hunits desired_space,
     (void)node_list_reverse(n);
   if (!force_reverse)
     reverse = !reverse;
-  assert(desired_space.is_zero() && nspaces == 0);
 }
 
 void environment::possibly_break_line(int start_here, int forced)


(The debug() diagnostic will not survive into the push.  It shows up a LOT in
our in-tree document corpus.)

I haven't thought deeply enough to be sure, but the above change might
actually resolve this bug.  What do you think?

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60673>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to