aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoachim Mairboeck <joachim.mairboeck@risc-software.at>2025-02-25 13:56:47 +0100
committerJoachim Mairboeck <joachim.mairboeck@risc-software.at>2025-02-25 13:56:47 +0100
commit8a392e9483783e63e2e63dc71bfd389523fe537d (patch)
treeccc3844357d18978bd1d7b6f3395d1bd37edd5fb
parent8e68addb0c225ea36392777399373a645b5744a0 (diff)
downloadscintilla-mirror-8a392e9483783e63e2e63dc71bfd389523fe537d.tar.gz
Bug [#2463]. Disallow case changes if the range contains protected text
-rw-r--r--doc/ScintillaHistory.html5
-rw-r--r--src/Editor.cxx2
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 7322d52f6..2eb053855 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -585,6 +585,7 @@
<td>Martijn Laan</td>
</tr><tr>
<td>Pawel Z Wronek</td>
+ <td>Joachim Mairboeck</td>
</tr>
</table>
<h2 id="Releases">Releases</h2>
@@ -596,6 +597,10 @@
Released 25 February 2025.
</li>
<li>
+ Disallow changing case of protected text.
+ <a href="https://sourceforge.net/p/scintilla/bugs/2463/">Bug #2463</a>.
+ </li>
+ <li>
On Qt, draw clipped UTF-8 text correctly.
<a href="https://sourceforge.net/p/scintilla/bugs/2464/">Bug #2464</a>.
</li>
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);