mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Avoid space before completion in mathed
This can happen if the current element has space after it (e.g. before
a relation).
Fixes bug #11283.
(cherry picked from commit 1b5ccecd65
)
This commit is contained in:
parent
f00a3e9304
commit
97f3f18007
@ -381,12 +381,14 @@ void MathRow::draw(PainterInfo & pi, int x, int const y) const
|
|||||||
|
|
||||||
if (!s1.empty()) {
|
if (!s1.empty()) {
|
||||||
f.setColor(Color_inlinecompletion);
|
f.setColor(Color_inlinecompletion);
|
||||||
pi.pain.text(x, y, s1, f);
|
// offset the text by e.after to make sure that the
|
||||||
|
// spacing is after the completion, not before.
|
||||||
|
pi.pain.text(x - e.after, y, s1, f);
|
||||||
x += mathed_string_width(f, s1);
|
x += mathed_string_width(f, s1);
|
||||||
}
|
}
|
||||||
if (!s2.empty()) {
|
if (!s2.empty()) {
|
||||||
f.setColor(Color_nonunique_inlinecompletion);
|
f.setColor(Color_nonunique_inlinecompletion);
|
||||||
pi.pain.text(x, y, s2, f);
|
pi.pain.text(x - e.after, y, s2, f);
|
||||||
x += mathed_string_width(f, s2);
|
x += mathed_string_width(f, s2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,6 +126,7 @@ What's new
|
|||||||
|
|
||||||
- Improve automatic removal of extra spaces, aka DEPM (bug 10503).
|
- Improve automatic removal of extra spaces, aka DEPM (bug 10503).
|
||||||
|
|
||||||
|
- Avoid white space before math completion (bug 11283).
|
||||||
|
|
||||||
|
|
||||||
* INTERNALS
|
* INTERNALS
|
||||||
|
Loading…
Reference in New Issue
Block a user