OptItem "Move Section up|u" "outline-up"
OptItem "Insert Short Title|T" "optional-insert"
Separator
+ OptItem "Accept Change|C" "change-accept"
+ OptItem "Reject Change|R" "change-reject"
+ Separator
Item "Apply Last Text Style|A" "textstyle-apply"
Submenu "Text Style|S" "edit_textstyles"
Item "Paragraph Settings...|P" "layout-paragraph"
#include "Language.h"
#include "Length.h"
#include "Lexer.h"
+#include "lyxfind.h"
#include "LyXRC.h"
#include "Paragraph.h"
#include "paragraph_funcs.h"
{
LASSERT(this == cur.text(), /**/);
- if (!cur.selection())
- return;
+ if (!cur.selection()) {
+ Change const & change = cur.paragraph().lookupChange(cur.pos());
+ if (!(change.changed() && findNextChange(&cur.bv())))
+ return;
+ }
cur.recordUndoSelection();
#include "buffer_funcs.h"
#include "BufferParams.h"
#include "BufferView.h"
+#include "Changes.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "DispatchResult.h"
case LFUN_CHANGE_ACCEPT:
case LFUN_CHANGE_REJECT:
- // TODO: context-sensitive enabling of LFUN_CHANGE_ACCEPT/REJECT
// In principle, these LFUNs should only be enabled if there
// is a change at the current position/in the current selection.
// However, without proper optimizations, this will inevitably
// result in unacceptable performance - just imagine a user who
// wants to select the complete content of a long document.
- enable = true;
+ if (!cur.selection()) {
+ Change const & change = cur.paragraph().lookupChange(cur.pos());
+ enable = change.changed();
+ } else
+ // TODO: context-sensitive enabling of LFUN_CHANGE_ACCEPT/REJECT
+ // for selections.
+ enable = true;
break;
case LFUN_OUTLINE_UP: