]> git.lyx.org Git - lyx.git/blobdiff - src/Text2.cpp
- moderncv.layout: add missing separator style
[lyx.git] / src / Text2.cpp
index b7b9f640880ec7a8d3dfd63f8cdb8ba2a534356f..199790cf2ac1361d02800cd187296e3e5719682d 100644 (file)
@@ -445,8 +445,11 @@ void Text::setLabelWidthStringToSequence(pit_type const par_offset,
        depth_type const depth = pars_[offset].getDepth();
        Layout const & layout = pars_[offset].layout();
        for (pit_type pit = offset; pit != end; ++pit) {
-               while (pars_[pit].getDepth() > depth)
+               while (pars_[pit].getDepth() > depth) {
                        ++pit;
+                       if (pit == end)
+                               return;
+               }
                if (pars_[pit].getDepth() < depth)
                        return;
                if (pars_[pit].layout() != layout)
@@ -532,6 +535,9 @@ bool Text::setCursor(Cursor & cur, pit_type par, pos_type pos,
        bool const update_needed = !tm.contains(par);
        Cursor old = cur;
        setCursorIntern(cur, par, pos, setfont, boundary);
+       // FIXME There is a chance that we'll miss a screen update here.
+       // If so, then do DEPM and then check if cur wants an update and
+       // go ahead and do it, if so.
        return cur.bv().checkDepm(cur, old) || update_needed;
 }