X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferView2.C;h=e58b0e4ef7665cdebe8851e7895d1aa701576b1e;hb=a69e7a45780e94f4330a91facfe35126c678e34e;hp=c8675a0a1cc53abd8751415a4cf1c2bcbb20fa52;hpb=4d3288c95b580560b4707e163a0e60609e287758;p=lyx.git diff --git a/src/BufferView2.C b/src/BufferView2.C index c8675a0a1c..e58b0e4ef7 100644 --- a/src/BufferView2.C +++ b/src/BufferView2.C @@ -73,10 +73,11 @@ bool BufferView::insertLyXFile(string const & filen) MakeDisplayPath(fname, 50)); return false; } + + char c = ifs.peek(); + LyXLex lex(0, 0); lex.setStream(ifs); - char c; ifs.get(c); - ifs.putback(c); bool res = true; @@ -152,8 +153,10 @@ void BufferView::insertErrors(TeXErrors & terr) int tmpid = -1; int tmppos = -1; - buffer()->texrow.getIdFromRow(errorrow, tmpid, tmppos); - + if (buffer()->texrow.getIdFromRow(errorrow, tmpid, tmppos)) { + buffer()->texrow.increasePos(tmpid, tmppos); + } + LyXParagraph * texrowpar = 0; if (tmpid == -1) {