]> 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>
Tue, 30 Jan 2018 10:06:30 +0000 (11:06 +0100)
commit34c1b3c42c54aa0107e1f785dfaff470f348fd4b
treeb01f9e77140c89f42b667a02c7387600ce28501f
parentbff3141b5c5b8f783b1a35b1463db8db55c9079e
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