X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCursorSlice.cpp;h=c5be12f5000a6c6b6dc771036b5228609837a078;hb=b0a73c0dfdbfa0541f04d7ee2578c4cd272ef7b9;hp=573ca9d4fe71b653bd2b3e1e02401c11171891b8;hpb=a8cfeb1538f93240a4d84bd22e09876672b53dcb;p=lyx.git diff --git a/src/CursorSlice.cpp b/src/CursorSlice.cpp index 573ca9d4fe..c5be12f500 100644 --- a/src/CursorSlice.cpp +++ b/src/CursorSlice.cpp @@ -23,7 +23,7 @@ #include "insets/Inset.h" #include "mathed/InsetMath.h" -#include "mathed/MathMacro.h" +#include "mathed/InsetMathMacro.h" #include "support/ExceptionMessage.h" #include "support/gettext.h" @@ -65,7 +65,7 @@ pos_type CursorSlice::lastpos() const LBUFERR(inset_); InsetMath const * math = inset_->asInsetMath(); bool paramless_macro = math && math->asMacro() && !math->asMacro()->nargs(); - return math ? (paramless_macro ? 0 : cell().size()) + return math ? (paramless_macro ? 0 : cell().size()) : (text()->empty() ? 0 : paragraph().size()); }