mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 15:01:58 +00:00
Fix bug #3997: RTL paragraphs are painted slightly too far to the left
In the computation of the row width, the last space on a row was included. However, this space is not drawn on screen and shouldn't contribute to the width. As a result all rows in a paragraph were painted slightly too far to the left, except the last on. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30967 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1c867a17b2
commit
231c2e2d61
@ -946,7 +946,12 @@ int TextMetrics::rowWidth(int right_margin, pit_type const pit,
|
||||
w -= singleWidth(pit, i - 1);
|
||||
w = max(w, label_end);
|
||||
}
|
||||
w += pm.singleWidth(i, *fi);
|
||||
|
||||
// a line separator at the end of a line (but not at the end of a
|
||||
// paragraph) will not be drawn and should therefore not count for
|
||||
// the row width.
|
||||
if (!par.isLineSeparator(i) || i != end - 1 || end == par.size())
|
||||
w += pm.singleWidth(i, *fi);
|
||||
|
||||
// add inline completion width
|
||||
if (inlineCompletionLPos == i) {
|
||||
|
Loading…
Reference in New Issue
Block a user