diff options
author | wl <wl> | 2006-09-06 15:27:01 +0000 |
---|---|---|
committer | wl <wl> | 2006-09-06 15:27:01 +0000 |
commit | d24668785067388288a9a1ce61c814bacc54e7f5 (patch) | |
tree | 45393efc3dc5bca7437240ff5220d8cce35c321a /src/roff | |
parent | b3cf4f5f630e1f1428d49ec82a543f52a55ee05d (diff) | |
download | groff-d24668785067388288a9a1ce61c814bacc54e7f5.tar.gz |
* 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.
Diffstat (limited to 'src/roff')
-rw-r--r-- | src/roff/troff/env.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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()) { |