From 8121036b5073d410141f72c8981f7cb1f1703b07 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 11 Jan 2007 17:40:23 +0000 Subject: [PATCH] optimization. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16649 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/dociterator.C | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dociterator.C b/src/dociterator.C index 9d9a59e0bf..7221d1438c 100644 --- a/src/dociterator.C +++ b/src/dociterator.C @@ -392,8 +392,11 @@ void DocIterator::forwardPar() pos_type const lastp = lastpos(); Paragraph const & par = paragraph(); pos_type & pos = top().pos(); - while (pos < lastp && !par.isInset(pos)) - ++pos; + if (par.insetlist.empty()) + pos = lastp; + else + while (pos < lastp && !par.isInset(pos)) + ++pos; } forwardPos(); }