diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index a617ac0fab5..7fb5eb390f1 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -1593,7 +1593,11 @@ bool NppParameters::load() std::wstring filePath, filePath2, issueFileName; - + //-------------------------------------------------------------// + // nppLogNetworkDriveIssue.xml // + // This empty xml file is optional - user adds this empty file // + // It's for debugging use only // + //-------------------------------------------------------------// filePath = _nppPath; issueFileName = nppLogNetworkDriveIssue; issueFileName += TEXT(".xml"); @@ -1606,6 +1610,11 @@ bool NppParameters::load() _doNppLogNetworkDriveIssue = (PathFileExists(filePath2.c_str()) == TRUE); } + //-------------------------------------------------------------// + // nppLogNulContentCorruptionIssue.xml // + // This empty xml file is optional - user adds this empty file // + // It's for debugging use only // + //-------------------------------------------------------------// filePath = _nppPath; issueFileName = nppLogNulContentCorruptionIssue; issueFileName += TEXT(".xml"); @@ -1642,14 +1651,28 @@ bool NppParameters::load() // manually in order to prevent Notepad++ transform column // // selection into multi-select. // //-------------------------------------------------------------// - std::wstring enableNoColumn2MultiSelectPath = _userPath; - pathAppend(enableNoColumn2MultiSelectPath, TEXT("noColumnToMultiSelect.xml")); + std::wstring disableColumn2MultiSelectPath = _userPath; + pathAppend(disableColumn2MultiSelectPath, TEXT("noColumnToMultiSelect.xml")); - if (PathFileExists(enableNoColumn2MultiSelectPath.c_str())) + if (PathFileExists(disableColumn2MultiSelectPath.c_str())) { _column2MultiSelect = false; } + //-------------------------------------------------------------// + // disableHardCodedShiftDelete.xml // + // This empty xml file is optional - user adds this empty file // + // manually in order to prevent hard coded Shift-DEL shortcut // + // delete whole line while no selection. // + //-------------------------------------------------------------// + std::wstring disableHardCodedShiftDeletePath = _userPath; + pathAppend(disableHardCodedShiftDeletePath, TEXT("disableHardCodedShiftDelete.xml")); + + if (PathFileExists(disableHardCodedShiftDeletePath.c_str())) + { + _useHardCodedShiftDelete = false; + } + return isAllLaoded; } diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 5e2766866b4..517aecbc11f 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -1878,6 +1878,7 @@ class NppParameters final bool isSelectFgColorEnabled() const { return _isSelectFgColorEnabled; }; bool isRegForOSAppRestartDisabled() const { return _isRegForOSAppRestartDisabled; }; bool doColumn2MultiSelect() const { return _column2MultiSelect; }; + bool useHardCodedShiftDelete() const { return _useHardCodedShiftDelete; }; private: bool _isAnyShortcutModified = false; @@ -1946,6 +1947,7 @@ class NppParameters final bool _isSelectFgColorEnabled = false; bool _isRegForOSAppRestartDisabled = false; bool _column2MultiSelect = true; + bool _useHardCodedShiftDelete = true; bool _doNppLogNetworkDriveIssue = false; bool _doNppLogNulContentCorruptionIssue = false; diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index e3d60171471..ea970067686 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -525,13 +525,14 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa SHORT shift = GetKeyState(VK_SHIFT); bool isColumnSelection = (execute(SCI_GETSELECTIONMODE) == SC_SEL_RECTANGLE) || (execute(SCI_GETSELECTIONMODE) == SC_SEL_THIN); bool column2MultSelect = (NppParameters::getInstance()).doColumn2MultiSelect(); + bool useHardCodedShiftDelete = (NppParameters::getInstance()).useHardCodedShiftDelete(); if (wParam == VK_DELETE) { // 1 shortcut: // Shift + Delete: without selected text, it will delete the whole line. // - if ((shift & 0x8000) && !(ctrl & 0x8000) && !(alt & 0x8000) && !hasSelection()) // Shift-DEL & no selection + if ((shift & 0x8000) && !(ctrl & 0x8000) && !(alt & 0x8000) && !hasSelection() && useHardCodedShiftDelete) // Shift-DEL & no selection { execute(SCI_LINEDELETE); return TRUE;