mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Avoid crash when inserting space in the middle of misspelled character
This is a fixup to commit 4796e6b3
.
This commit is contained in:
parent
605b933ec2
commit
cb0dbfdadb
@ -230,7 +230,8 @@ void RowPainter::paintMisspelledMark(double const orig_x,
|
||||
FontMetrics const & fm = theFontMetrics(font);
|
||||
int x1 = fm.pos2x(str, range.first - start_pos,
|
||||
font.isVisibleRightToLeft());
|
||||
int x2 = fm.pos2x(str, range.last - start_pos + 1,
|
||||
int x2 = fm.pos2x(str, min(range.last - start_pos + 1,
|
||||
pos_type(str.length())),
|
||||
font.isVisibleRightToLeft());
|
||||
if (x1 > x2)
|
||||
swap(x1, x2);
|
||||
|
Loading…
Reference in New Issue
Block a user