// should probably be moved into BufferList (Lgb)
// Perfect target for a thread...
{
- if (!bv->available())
+ if (!bv->buffer())
return;
if (bv->buffer()->isBakClean() || bv->buffer()->isReadonly()) {
// Insert ascii file (if filename is empty, prompt for one)
void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
{
- if (!bv->available())
+ if (!bv->buffer())
return;
// FIXME: We don't know the encoding of the file
return;
// clear the selection
- if (bv->text() == bv->getLyXText())
+ LyXText const & text = bv->buffer()->text();
+ if (&text == bv->getLyXText())
bv->cursor().clearSelection();
if (asParagraph)
bv->getLyXText()->insertStringAsParagraphs(bv->cursor(), tmpstr);