diff --git a/src/BufferView.cpp b/src/BufferView.cpp index c75b115fad..7e658a726b 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -983,6 +983,7 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd) case LFUN_CHANGES_MERGE: case LFUN_CHANGE_NEXT: + case LFUN_CHANGE_PREVIOUS: case LFUN_ALL_CHANGES_ACCEPT: case LFUN_ALL_CHANGES_REJECT: // TODO: context-sensitive enabling of LFUNs @@ -1227,6 +1228,12 @@ bool BufferView::dispatch(FuncRequest const & cmd) // FIXME: Move this LFUN to Buffer so that we don't have to do this: processUpdateFlags(Update::Force | Update::FitCursor); break; + + case LFUN_CHANGE_PREVIOUS: + findPreviousChange(this); + // FIXME: Move this LFUN to Buffer so that we don't have to do this: + processUpdateFlags(Update::Force | Update::FitCursor); + break; case LFUN_CHANGES_MERGE: if (findNextChange(this)) { diff --git a/src/FuncCode.h b/src/FuncCode.h index e83c8bbc25..f46f0e1e60 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -348,10 +348,10 @@ enum FuncCode LFUN_PARAGRAPH_MOVE_UP, LFUN_BUFFER_TOGGLE_COMPRESSION, // bpeng 20060427 // 265 - LFUN_MATH_BIGDELIM, LFUN_CLIPBOARD_PASTE, LFUN_INSET_DISSOLVE, // jspitzm 20060807 LFUN_CHANGE_NEXT, + LFUN_CHANGE_PREVIOUS, // vfr 20090404 LFUN_WINDOW_NEW, // Abdel 20061021 // 270 LFUN_WINDOW_CLOSE, // Abdel 20061023 @@ -425,6 +425,8 @@ enum FuncCode LFUN_SCREEN_SHOW_CURSOR, // vfr, 20090325 LFUN_BUFFER_ZOOM_IN, // vfr, 20090330 LFUN_BUFFER_ZOOM_OUT, // vfr, 20090330 + // 330 + LFUN_MATH_BIGDELIM, LFUN_LASTACTION // end of the table diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index a2e3379fb7..be5a544881 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -2108,6 +2108,15 @@ void LyXAction::init() * \endvar */ { LFUN_CHANGE_NEXT, "change-next", ReadOnly, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_CHANGE_PREVIOUS + * \li Action: Moves the cursor to the position of the previous change + of the change tracking records. + * \li Syntax: change-previous + * \li Origin: vfr, 4 Apr 2009 + * \endvar + */ + { LFUN_CHANGE_PREVIOUS, "change-previous", ReadOnly, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_CHANGES_MERGE * \li Action: Open change tracking dialog for merging and moves the cursor