]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.C
move some selection related stuff over to textcursor.C
[lyx.git] / src / paragraph_funcs.C
index 7c42132308a852c0a11b3b9f87c312517abeb980..73de67f9c20e019bf250d0e2db69204f066a607c 100644 (file)
@@ -32,7 +32,6 @@
 #include "insets/insetlatexaccent.h"
 #include "insets/insettabular.h"
 #include "insets/insethfill.h"
-#include "insets/inseterror.h"
 #include "insets/insetnewline.h"
 
 extern string bibitemWidest(Buffer const *);
@@ -1007,9 +1006,9 @@ int readParToken(Buffer & buf, Paragraph & par, LyXLex & lex, string const & tok
                lex.eatLine();
                string const s = bformat(_("Unknown token: %1$s %2$s\n"),
                        token, lex.getString());
-               // we can do this here this way because we're actually reading
-               // the buffer and don't care about LyXText right now.
-               par.insertInset(par.size(), new InsetError(s), font);
+
+               buf.parseError(ErrorItem(_("Unknown token"), s, 
+                                        par.id(), 0, par.size()));
                return 1;
        }
        return 0;