case LFUN_INSERT_LABEL:
case LFUN_BOOKMARK_SAVE:
case LFUN_REF_GOTO:
+ case LFUN_GOTO_PARAGRAPH:
case LFUN_WORD_FIND:
case LFUN_WORD_REPLACE:
case LFUN_MARK_OFF:
break;
}
+ case LFUN_GOTO_PARAGRAPH: {
+ int const id = convert<int>(cmd.argument);
+ ParIterator par = buffer_->getParFromID(id);
+ if (par == 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
+ bv_->setCursor(par, 0);
+
+ update();
+ switchKeyMap();
+ break;
+ }
+
case LFUN_TRACK_CHANGES:
trackChanges();
break;
+2005-02-09 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * BufferView_pimpl.C (dispatch): handle LFUN_GOTO_PARAGRAPH here,
+ but use update() to get correct screen display; use convert
+ instead of istringstream.
+ (getStatus): handle LFUN_GOTO_PARAGRAPH
+
+ * lyxfunc.C (dispatch, getStatus): do not handle
+ LFUN_GOTO_PARAGRAPH here.
+
2005-02-08 Lars Gullik Bjonnes <larsbj@gullik.net>
* text3.C (dispatch): size() -> depth()
case LFUN_GETNAME:
case LFUN_NOTIFY:
case LFUN_GOTOFILEROW:
- case LFUN_GOTO_PARAGRAPH:
case LFUN_DIALOG_SHOW_NEXT_INSET:
case LFUN_DIALOG_HIDE:
case LFUN_DIALOG_DISCONNECT_INSET:
break;
}
- 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;
- }
-
case LFUN_DIALOG_SHOW: {
string const name = cmd.getArg(0);
string data = trim(cmd.argument.substr(name.size()));