Subject: Re: bug#6738: possible bug in fill-paragraph

From: Stefan Monnier <[email-masked]>
Date: Mon, 02 Aug 2010 12:27:31 +0200

> It seems that the algorithm in justify-current-line doesn't work so well
> for a two-word line: it correctly calculates the number of additional
> space characters needed (ncols) but expects to fractionally distribute
> them, as it does in the other lines, so it adds more space, in this case
> wrongly.  In such a situation, it suffices to just stick with ncols, as
> in the following patch (but I haven't tested this in other cases, so
> maybe it isn't the best fix).

I've changed the curr-fracspace calculation instead.  Not sure why it
was doing a +1 on nspaces, and removing it fixes this problem (I'm not
sure it doesn't introduce another one, but at least my tests lead me to
think that's not the case).

        Stefan