]> git.lyx.org Git - features.git/commit
Remove 'premature optimization' that proved buggy
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 3 Jan 2018 17:28:55 +0000 (18:28 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 15 Jan 2018 08:49:10 +0000 (09:49 +0100)
commit894ae19224d0537c0c9ebd9ad45e547279769bd8
treec7c26d8139f44eeb25ef3641f25a38071720199a
parent41fe69e5d04adeeece67d878f744ffd91c4552b6
Remove 'premature optimization' that proved buggy

At some time it seemed like a good idea in breakRow() to return early
when the row was bound to be empty. It turns out that this creates two
symptoms:

* empty paragraphs will not have an end of paragraph marker

* since row width is not correctly computed in this case, caret ghosts
  can appear in master.

This commit removes the oprimization and replace the do {} while()
construct to a straightforward while() {}.

Related to bug #10952.

(cherry picked from commit 76f0a3dd4ee5c7958c6dea79628ef8c2ac2c59bd)
src/TextMetrics.cpp