summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.cpp')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index d00b4d6a61..96868d03c1 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -884,7 +884,7 @@ bool CFX_Edit::Delete() {
return Delete(true, true);
}
-bool CFX_Edit::Clear() {
+bool CFX_Edit::ClearSelection() {
return Clear(true, true);
}
@@ -1736,9 +1736,10 @@ bool CFX_Edit::Clear(bool bAddUndo, bool bPaint) {
return false;
CPVT_WordRange range = m_SelState.ConvertToWordRange();
- if (bAddUndo && m_bEnableUndo)
+ if (bAddUndo && m_bEnableUndo) {
AddEditUndoItem(
pdfium::MakeUnique<CFXEU_Clear>(this, range, GetSelectedText()));
+ }
SelectNone();
SetCaret(m_pVT->DeleteWords(range));