#include <ostream>
+using namespace std;
namespace lyx {
pos_type CursorSlice::lastpos() const
{
BOOST_ASSERT(inset_);
- return inset_->asInsetMath() ? cell().size() : paragraph().size();
+ return inset_->asInsetMath() ? cell().size()
+ : (text()->empty() ? 0 : paragraph().size());
}
}
-std::ostream & operator<<(std::ostream & os, CursorSlice const & item)
+ostream & operator<<(ostream & os, CursorSlice const & item)
{
return os
<< "inset: " << (void *)&item.inset()