mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix line breaking at trailing space
With a string like "abc def [inset]", it should be possible to break between the "def" and the inset. A case of interest is when "abc def " is too long, but "abc def" is not. To this end, tweak the test that look whether breaking was successful: the right width to look at is nscp_width, the width without the final space.
This commit is contained in:
parent
3bba2ad150
commit
bbaebd15ce
@ -144,7 +144,7 @@ bool Row::Element::splitAt(int const width, int next_width, bool force,
|
|||||||
isRTL(), wrap_any | force);
|
isRTL(), wrap_any | force);
|
||||||
|
|
||||||
// if breaking did not really work, give up
|
// if breaking did not really work, give up
|
||||||
if (!force && breaks.front().wid > width) {
|
if (!force && breaks.front().nspc_wid > width) {
|
||||||
if (dim.wid == 0)
|
if (dim.wid == 0)
|
||||||
dim.wid = fm.width(str);
|
dim.wid = fm.width(str);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user