mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Fix bug #9040: In RtL documents end-of-paragraph marker shifts the row display
The fact that the bug was still present in the features/str-metrics branch comes from a goof in the initial implementation of 'virtual' row elements (completion and end-of-par markers). Now that this is corrected, everything works as it should. The fact that the bug is present in master is due to some other reason that is not useful to investigate now.
This commit is contained in:
parent
1a4b3201e7
commit
7167d90b50
@ -282,7 +282,6 @@ void Row::add(pos_type const pos, char_type const c,
|
||||
Element e(STRING, pos, f, ch);
|
||||
elements_.push_back(e);
|
||||
}
|
||||
//lyxerr << "FONT " <<back().font.language() << endl;
|
||||
back().str += c;
|
||||
back().endpos = pos + 1;
|
||||
}
|
||||
@ -294,7 +293,8 @@ void Row::addVirtual(pos_type const pos, docstring const & s,
|
||||
finalizeLast();
|
||||
Element e(VIRTUAL, pos, f, ch);
|
||||
e.str = s;
|
||||
// A completion has no size
|
||||
e.dim.wid = theFontMetrics(f).width(s);
|
||||
dim_.wid += e.dim.wid;
|
||||
e.endpos = pos;
|
||||
elements_.push_back(e);
|
||||
finalizeLast();
|
||||
|
Loading…
Reference in New Issue
Block a user