]> git.lyx.org Git - features.git/blobdiff - src/Text.cpp
Add accept/reject change to the edit context menu.
[features.git] / src / Text.cpp
index b9bc20f621e511a487565e6c7c3df9a5eb21378d..7f1861efb2e35649797c38ae95c6f568a4a4f116 100644 (file)
@@ -37,6 +37,7 @@
 #include "Language.h"
 #include "Length.h"
 #include "Lexer.h"
+#include "lyxfind.h"
 #include "LyXRC.h"
 #include "Paragraph.h"
 #include "paragraph_funcs.h"
@@ -792,8 +793,11 @@ void Text::acceptOrRejectChanges(Cursor & cur, ChangeOp op)
 {
        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();