]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Typo.
[lyx.git] / src / TextMetrics.cpp
index 7abe5f6965da9aeb8fc893926162d3a722bc0515..94b29f683e1511f90c59dce2d92ec120d668ed4e 100644 (file)
@@ -49,7 +49,7 @@
 
 #include "support/debug.h"
 #include <cstdlib>
-#include "support/assert.h"
+#include "support/lassert.h"
 
 using namespace std;
 
@@ -2033,6 +2033,10 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
                        beg.pos() = row.sel_beg;
                        end.pit() = pit;
                        end.pos() = row.sel_end;
+                       if (end.pos() == row.endpos()) {
+                               // selection goes till the end of the row.
+                               end.boundary(true);
+                       }
                        drawRowSelection(pi, x, row, beg, end, beg_margin, end_margin);
                }