aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-06-02 01:32:55 +0000
committernyamatongwe <devnull@localhost>2005-06-02 01:32:55 +0000
commitd37ef88d85cf2a2e5d34322a76220cf64e918a7a (patch)
tree8650cbb5a751f1d22cbfe60eafc84484d62981ad /src/Document.cxx
parentf9cbabf73df359b77fde7f1851f9429324a0289e (diff)
downloadscintilla-mirror-d37ef88d85cf2a2e5d34322a76220cf64e918a7a.tar.gz
Fix bug in multi-byte encodings where making selection upper case or lower
case would not change the first character on each line.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 51299b37c..c28879bea 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1227,11 +1227,9 @@ int Document::LinesTotal() {
}
void Document::ChangeCase(Range r, bool makeUpperCase) {
- for (int pos = r.start; pos < r.end; pos++) {
+ for (int pos = r.start; pos < r.end;) {
int len = LenChar(pos);
- if (dbcsCodePage && (len > 1)) {
- pos += len;
- } else {
+ if (len == 1) {
char ch = CharAt(pos);
if (makeUpperCase) {
if (IsLowerCase(ch)) {
@@ -1243,6 +1241,7 @@ void Document::ChangeCase(Range r, bool makeUpperCase) {
}
}
}
+ pos += len;
}
}