From dfa6c19d8766a8c3cf66fdb6632deddbd3b6a8e9 Mon Sep 17 00:00:00 2001 From: Chukwudumebi Smarty Date: Sat, 24 Sep 2022 22:14:12 -0500 Subject: [PATCH] Make ESC Key abort "Move to Recycle Bin" confirmation prompt Fix #12117, close #12239 --- PowerEditor/src/Notepad_plus.cpp | 2 +- PowerEditor/src/NppIO.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 706973a24..1447744bf 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2141,7 +2141,7 @@ int Notepad_plus::doDeleteOrNot(const TCHAR *fn) _pPublicInterface->getHSelf(), TEXT("The file \"$STR_REPLACE$\"\rwill be moved to your Recycle Bin and this document will be closed.\rContinue?"), TEXT("Delete file"), - MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL, + MB_OKCANCEL | MB_ICONQUESTION | MB_APPLMODAL, 0, // not used fn); } diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index ddb359ff8..aae1ce005 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -1885,7 +1885,7 @@ bool Notepad_plus::fileDelete(BufferID id) if (winVersion >= WV_WIN8 || winVersion == WV_UNKNOWN) { // Windows 8 (and version afer?) has no system alert, so we ask user's confirmation - goAhead = (doDeleteOrNot(fileNamePath) == IDYES); + goAhead = (doDeleteOrNot(fileNamePath) == IDOK); } if (goAhead)