From 8a392e9483783e63e2e63dc71bfd389523fe537d Mon Sep 17 00:00:00 2001 From: Joachim Mairboeck Date: Tue, 25 Feb 2025 13:56:47 +0100 Subject: Bug [#2463]. Disallow case changes if the range contains protected text --- src/Editor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 283edff8f..a696cb7e0 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3143,7 +3143,7 @@ void Editor::ChangeCaseOfSelection(CaseMapping caseMapping) { SelectionRange currentNoVS = current; currentNoVS.ClearVirtualSpace(); const size_t rangeBytes = currentNoVS.Length(); - if (rangeBytes > 0) { + if (rangeBytes > 0 && !RangeContainsProtected(currentNoVS)) { std::string sText = RangeText(currentNoVS.Start().Position(), currentNoVS.End().Position()); std::string sMapped = CaseMapString(sText, caseMapping); -- cgit v1.2.3