From d24668785067388288a9a1ce61c814bacc54e7f5 Mon Sep 17 00:00:00 2001 From: wl Date: Wed, 6 Sep 2006 15:27:01 +0000 Subject: * src/roff/troff/env.cpp (environment::do_break): Insert zero-width space only if there is no previous space. This fixes a bug which caused unwanted filling of the last line in a paragraph. Thanks to Gunnar Ritter for an analysis. --- src/roff/troff/env.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp index 25bde8a1..0f907be8 100644 --- a/src/roff/troff/env.cpp +++ b/src/roff/troff/env.cpp @@ -2336,8 +2336,10 @@ void environment::do_break(int do_spread) wrap_up_tab(); if (line) { // this is so that hyphenation works - line = new space_node(H0, get_fill_color(), line); - space_total++; + if (line->nspaces() == 0) { + line = new space_node(H0, get_fill_color(), line); + space_total++; + } possibly_break_line(0, do_spread); } while (line != 0 && line->discardable()) { -- cgit v1.2.1