]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.cpp
After a hiatus, I'm returning to the rewrite of InsetCommandParams, the purpose of...
[lyx.git] / src / rowpainter.cpp
index 7801d6b023dbfd2d40519b7b69c16e20444a1a9a..e4e48d6c5226246c2bb955ace995a68c854f328c 100644 (file)
@@ -505,7 +505,7 @@ void RowPainter::paintFirst()
                FontInfo const font = getLabelFont();
                FontMetrics const & fm = theFontMetrics(font);
 
-               docstring const str = par_.getLabelstring();
+               docstring const str = par_.labelString();
                if (!str.empty()) {
                        double x = x_;
 
@@ -551,8 +551,8 @@ void RowPainter::paintFirst()
                layout->labeltype == LABEL_BIBLIO ||
                layout->labeltype == LABEL_CENTERED_TOP_ENVIRONMENT)) {
                FontInfo const font = getLabelFont();
-               if (!par_.getLabelstring().empty()) {
-                       docstring const str = par_.getLabelstring();
+               docstring const str = par_.labelString();
+               if (!str.empty()) {
                        double spacing_val = 1.0;
                        if (!parparams.spacing().isDefault())
                                spacing_val = parparams.spacing().getValue();
@@ -685,8 +685,10 @@ void RowPainter::paintText()
        pos_type inlineCompletionVPos = -1;
        if (inlineCompletionPos.inTexted()
            && inlineCompletionPos.text() == &text_
-           && inlineCompletionPos.pit() == pit_) {
-               // draw visually behind the previous character
+           && inlineCompletionPos.pit() == pit_
+           && inlineCompletionPos.pos() >= row_.pos()
+           && inlineCompletionPos.pos() <= row_.endpos()) {
+               // draw logically behind the previous character
                inlineCompletionVPos = bidi_.log2vis(inlineCompletionPos.pos() - 1);
        }
 
@@ -767,7 +769,7 @@ void RowPainter::paintText()
                
                // Is the inline completion in front of character?
                if (font.isRightToLeft() && vpos == inlineCompletionVPos)
-                       paintInlineCompletion(font);            
+                       paintInlineCompletion(font);
 
                if (par_.isSeparator(pos)) {
                        Font const orig_font = text_metrics_.getDisplayFont(pit_, pos);