]> git.lyx.org Git - lyx.git/blobdiff - src/cursor.C
hopefully fix tex2lyx linking.
[lyx.git] / src / cursor.C
index 69095b37ee3641bc0fc866f1d1f5f4c6185fd8e6..42a0c7cf1bfcc318e985ed8121705f6202d45f5e 100644 (file)
@@ -285,7 +285,7 @@ void LCursor::dispatch(FuncRequest const & cmd0)
                // The common case is 'LFUN handled, need update', so make the
                // LFUN handler's life easier by assuming this as default value.
                // The handler can reset the update and val flags if necessary.
-               disp_.update(true);
+               disp_.update(Update::FitCursor | Update::Force);
                disp_.dispatched(true);
                inset().dispatch(*this, cmd);
                if (disp_.dispatched())
@@ -296,7 +296,7 @@ void LCursor::dispatch(FuncRequest const & cmd0)
        if (!disp_.dispatched()) {
                lyxerr[Debug::DEBUG] << "RESTORING OLD CURSOR!" << endl;
                operator=(safe);
-               disp_.update(false);
+               disp_.update(Update::None);
                disp_.dispatched(false);
        }
 }
@@ -527,14 +527,15 @@ void LCursor::info(odocstream & os) const
 }
 
 
-void LCursor::selHandle(bool sel)
+bool LCursor::selHandle(bool sel)
 {
        //lyxerr << "LCursor::selHandle" << endl;
        if (sel == selection())
-               return;
+               return false;
 
        resetAnchor();
        selection() = sel;
+       return true;
 }
 
 
@@ -899,9 +900,6 @@ int LCursor::targetX() const
 
 void LCursor::setTargetX()
 {
-       // For now this is good enough. A better solution would be to
-       // avoid this rebreak by setting cursorX only after drawing
-       bottom().text()->redoParagraph(bottom().pit());
        int x;
        int y;
        getPos(x, y);
@@ -1174,9 +1172,9 @@ string LCursor::currentState()
 }
 
 
-string LCursor::getPossibleLabel()
+docstring LCursor::getPossibleLabel()
 {
-       return inMathed() ? "eq:" : text()->getPossibleLabel(*this);
+       return inMathed() ? from_ascii("eq:") : text()->getPossibleLabel(*this);
 }
 
 
@@ -1212,15 +1210,15 @@ void LCursor::dispatched()
 }
 
 
-void LCursor::needsUpdate()
+void LCursor::updateFlags(Update::flags f)
 {
-       disp_.update(true);
+       disp_.update(f);
 }
 
 
 void LCursor::noUpdate()
 {
-       disp_.update(false);
+       disp_.update(Update::None);
 }