Don't allow inserting two consecutive separators.

This commit is contained in:
Enrico Forestieri 2014-05-18 18:02:25 +02:00
parent c5753af50d
commit 10d5897327

View File

@ -1073,6 +1073,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
Paragraph const & par = pars_[pit];
Paragraph const & prevpar = pit > 0 ? pars_[pit - 1] : par;
if (pit > 0 && cur.pos() == par.beginOfBody()
&& !par.isEnvSeparator(cur.pos())
&& ((prevpar.getDepth() > par.getDepth()
&& !par.layout().isEnvironment())
|| (prevpar.layout() != par.layout()