DocIterator dit = b->getParFromID(id);
if (dit.atEnd()) {
LYXERR(Debug::INFO, "No matching paragraph found! [" << id << "].");
+ ++i;
+ continue;
+ }
+ LYXERR(Debug::INFO, "Paragraph " << dit.paragraph().id()
+ << " found in buffer `"
+ << b->absFileName() << "'.");
+
+ if (b == &buffer_) {
+ // Set the cursor
+ setCursor(dit);
+ processUpdateFlags(Update::Force | Update::FitCursor);
} else {
- LYXERR(Debug::INFO, "Paragraph " << dit.paragraph().id()
- << " found in buffer `"
- << b->absFileName() << "'.");
-
- if (b == &buffer_) {
- // Set the cursor
- setCursor(dit);
- showCursor();
- } else {
- // Switch to other buffer view and resend cmd
- theLyXFunc().dispatch(FuncRequest(
- LFUN_BUFFER_SWITCH, b->absFileName()));
- theLyXFunc().dispatch(cmd);
- }
- break;
+ // Switch to other buffer view and resend cmd
+ theLyXFunc().dispatch(FuncRequest(
+ LFUN_BUFFER_SWITCH, b->absFileName()));
+ theLyXFunc().dispatch(cmd);
}
- ++i;
+ break;
}
break;
}