mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-30 17:24:54 +02:00
Make column to multi-select be abled to be disabled
In order to disable the "Column to multi-select" ability (new feature introduced in v8.6), users must add an empty file named "noColumnToMultiSelect.xml", in "%APPDATA%\Notepad++\" directory (or in the Notepad++ installed directory in portable mode) to prevent this behaviour. ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14296#issuecomment-1848076816 Fix #14464, close #14476
This commit is contained in:
parent
e497ae2c06
commit
aef0438180
@ -1635,6 +1635,21 @@ bool NppParameters::load()
|
|||||||
_isRegForOSAppRestartDisabled = (::PathFileExists(filePath.c_str()) == TRUE);
|
_isRegForOSAppRestartDisabled = (::PathFileExists(filePath.c_str()) == TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------//
|
||||||
|
// noColumnToMultiSelect.xml //
|
||||||
|
// This empty xml file is optional - user adds this empty file //
|
||||||
|
// manually in order to prevent Notepad++ transform column //
|
||||||
|
// selection into multi-select. //
|
||||||
|
//-------------------------------------------------------------//
|
||||||
|
std::wstring enableNoColumn2MultiSelectPath = _userPath;
|
||||||
|
pathAppend(enableNoColumn2MultiSelectPath, TEXT("noColumnToMultiSelect.xml"));
|
||||||
|
|
||||||
|
if (PathFileExists(enableNoColumn2MultiSelectPath.c_str()))
|
||||||
|
{
|
||||||
|
_column2MultiSelect = false;
|
||||||
|
}
|
||||||
|
|
||||||
return isAllLaoded;
|
return isAllLaoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1877,6 +1877,7 @@ public:
|
|||||||
bool regexBackward4PowerUser() const { return _findHistory._regexBackward4PowerUser; }
|
bool regexBackward4PowerUser() const { return _findHistory._regexBackward4PowerUser; }
|
||||||
bool isSelectFgColorEnabled() const { return _isSelectFgColorEnabled; };
|
bool isSelectFgColorEnabled() const { return _isSelectFgColorEnabled; };
|
||||||
bool isRegForOSAppRestartDisabled() const { return _isRegForOSAppRestartDisabled; };
|
bool isRegForOSAppRestartDisabled() const { return _isRegForOSAppRestartDisabled; };
|
||||||
|
bool doColumn2MultiSelect() const { return _column2MultiSelect; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _isAnyShortcutModified = false;
|
bool _isAnyShortcutModified = false;
|
||||||
@ -1944,10 +1945,11 @@ private:
|
|||||||
|
|
||||||
bool _isSelectFgColorEnabled = false;
|
bool _isSelectFgColorEnabled = false;
|
||||||
bool _isRegForOSAppRestartDisabled = false;
|
bool _isRegForOSAppRestartDisabled = false;
|
||||||
|
bool _column2MultiSelect = true;
|
||||||
|
|
||||||
bool _doNppLogNetworkDriveIssue = false;
|
bool _doNppLogNetworkDriveIssue = false;
|
||||||
|
|
||||||
bool _doNppLogNulContentCorruptionIssue = false;
|
bool _doNppLogNulContentCorruptionIssue = false;
|
||||||
|
|
||||||
bool _isEndSessionStarted = false;
|
bool _isEndSessionStarted = false;
|
||||||
bool _isEndSessionCritical = false;
|
bool _isEndSessionCritical = false;
|
||||||
|
|
||||||
|
@ -524,6 +524,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
|||||||
SHORT alt = GetKeyState(VK_MENU);
|
SHORT alt = GetKeyState(VK_MENU);
|
||||||
SHORT shift = GetKeyState(VK_SHIFT);
|
SHORT shift = GetKeyState(VK_SHIFT);
|
||||||
bool isColumnSelection = (execute(SCI_GETSELECTIONMODE) == SC_SEL_RECTANGLE) || (execute(SCI_GETSELECTIONMODE) == SC_SEL_THIN);
|
bool isColumnSelection = (execute(SCI_GETSELECTIONMODE) == SC_SEL_RECTANGLE) || (execute(SCI_GETSELECTIONMODE) == SC_SEL_THIN);
|
||||||
|
bool column2MultSelect = (NppParameters::getInstance()).doColumn2MultiSelect();
|
||||||
|
|
||||||
if (wParam == VK_DELETE)
|
if (wParam == VK_DELETE)
|
||||||
{
|
{
|
||||||
@ -610,7 +611,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isColumnSelection)
|
else if (isColumnSelection && column2MultSelect)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Transform the column selection to multi-edit
|
// Transform the column selection to multi-edit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user