- case LFUN_GOTO_PARAGRAPH: {
- istringstream is(argument);
- int id;
- is >> id;
- ParIterator par = owner->buffer()->getParFromID(id);
- if (par == owner->buffer()->par_iterator_end()) {
- lyxerr[Debug::INFO] << "No matching paragraph found! ["
- << id << ']' << endl;
- break;
- } else {
- lyxerr[Debug::INFO] << "Paragraph " << par->id()
- << " found." << endl;
- }
-
- // Set the cursor
- view()->setCursor(par, 0);
-
- view()->switchKeyMap();
- owner->view_state_changed();
-
- view()->center();
- // see BufferView_pimpl::center()
- view()->updateScrollbar();
- break;
- }
-