aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2004-05-13 13:05:00 +0000
committernyamatongwe <unknown>2004-05-13 13:05:00 +0000
commitdb54949b68735509c0de434e4c2c8151065467db (patch)
tree68ea9053877db187f69ffc04f781e17a774e896c /src
parentc71c1f0039a2d9333f6ea5548ba8e48f89f6101c (diff)
downloadscintilla-mirror-db54949b68735509c0de434e4c2c8151065467db.tar.gz
Made LineLayout::styles unsigned as slightly safer
if anyone extends to allow 256 styles.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx10
-rw-r--r--src/Editor.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 7bafb3fff..cadc6b800 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -71,7 +71,7 @@ void LineLayout::Resize(int maxLineLength_) {
if (maxLineLength_ > maxLineLength) {
Free();
chars = new char[maxLineLength_ + 1];
- styles = new char[maxLineLength_ + 1];
+ styles = new unsigned char[maxLineLength_ + 1];
indicators = new char[maxLineLength_ + 1];
// Extra position allocated as sometimes the Windows
// GetTextExtentExPoint API writes an extra element.
@@ -4631,7 +4631,7 @@ char *Editor::CopyRange(int start, int end) {
}
void Editor::CopySelectionFromRange(SelectionText *ss, int start, int end) {
- ss->Set(CopyRange(start, end), end - start + 1,
+ ss->Set(CopyRange(start, end), end - start + 1,
pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false);
}
@@ -4674,7 +4674,7 @@ void Editor::CopySelectionRange(SelectionText *ss) {
text[size] = '\0';
}
}
- ss->Set(text, size + 1, pdoc->dbcsCodePage,
+ ss->Set(text, size + 1, pdoc->dbcsCodePage,
vs.styles[STYLE_DEFAULT].characterSet, selType == selRectangle);
}
}
@@ -4683,14 +4683,14 @@ void Editor::CopyRangeToClipboard(int start, int end) {
start = pdoc->ClampPositionIntoDocument(start);
end = pdoc->ClampPositionIntoDocument(end);
SelectionText selectedText;
- selectedText.Set(CopyRange(start, end), end - start + 1,
+ selectedText.Set(CopyRange(start, end), end - start + 1,
pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false);
CopyToClipboard(selectedText);
}
void Editor::CopyText(int length, const char *text) {
SelectionText selectedText;
- selectedText.Copy(text, length,
+ selectedText.Copy(text, length,
pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false);
CopyToClipboard(selectedText);
}
diff --git a/src/Editor.h b/src/Editor.h
index 9e9af0ec1..b9bda04ab 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -63,7 +63,7 @@ public:
bool containsCaret;
int edgeColumn;
char *chars;
- char *styles;
+ unsigned char *styles;
char *indicators;
int *positions;
char bracePreviousStyles[2];