]> git.lyx.org Git - features.git/blobdiff - src/Cursor.cpp
Detect properly when cursor position cannot be computed
[features.git] / src / Cursor.cpp
index cd796458de12c4f551aea72f5e4d2d4094488082..c1458dc8a7a0cfc757870775cb2095e748ede087 100644 (file)
@@ -548,6 +548,16 @@ int Cursor::currentMode()
 }
 
 
+bool Cursor::inCoordCache() const
+{
+       CoordCache::Insets const & icache = bv_->coordCache().getInsets();
+       for (size_t i = 0 ; i < depth() ; ++i)
+               if (!icache.has(&(*this)[i].inset()))
+                       return false;
+       return true;
+}
+
+
 void Cursor::getPos(int & x, int & y) const
 {
        Point p = bv().getPos(*this);