// needed to insert the selection
-void Text::insertStringAsLines(DocIterator const & dit, docstring const & str,
+void Text::insertStringAsLines(Cursor & cur, docstring const & str,
Font const & font)
{
BufferParams const & bparams = owner_->buffer().params();
- pit_type pit = dit.pit();
- pos_type pos = dit.pos();
+ pit_type pit = cur.pit();
+ pos_type pos = cur.pos();
// insert the string, don't insert doublespace
bool space_inserted = true;
space_inserted = (*cit == ' ');
}
}
+ setCursor(cur, pit, pos);
}
// turn double CR to single CR, others are converted into one
// blank. Then insertStringAsLines is called
-void Text::insertStringAsParagraphs(DocIterator const & dit, docstring const & str,
+void Text::insertStringAsParagraphs(Cursor & cur, docstring const & str,
Font const & font)
{
docstring linestr = str;
newline_inserted = false;
}
}
- insertStringAsLines(dit, linestr, font);
+ insertStringAsLines(cur, linestr, font);
}
/* these things are for search and replace */
/// needed to insert the selection
- void insertStringAsLines(DocIterator const & dit, docstring const & str,
+ void insertStringAsLines(Cursor & cur, docstring const & str,
Font const & font);
/// needed to insert the selection
- void insertStringAsParagraphs(DocIterator const & dit, docstring const & str,
+ void insertStringAsParagraphs(Cursor & cur, docstring const & str,
Font const & font);
/// access to our paragraphs