aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Decoration.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-09 21:05:33 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-09 21:05:33 +1100
commitaae86a999fe82ab85660991892253040126386b8 (patch)
tree1c82cf445ee7f3d0e9644a9a97bf978798479e84 /src/Decoration.cxx
parent2d698add257d0bbb38335659ed944e9cc41fe593 (diff)
downloadscintilla-mirror-aae86a999fe82ab85660991892253040126386b8.tar.gz
Use Position/Line/int more accurately in preparation for large documents.
Diffstat (limited to 'src/Decoration.cxx')
-rw-r--r--src/Decoration.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Decoration.cxx b/src/Decoration.cxx
index a9e22adda..6f75058dd 100644
--- a/src/Decoration.cxx
+++ b/src/Decoration.cxx
@@ -53,7 +53,7 @@ Decoration *DecorationList::DecorationFromIndicator(int indicator) {
return nullptr;
}
-Decoration *DecorationList::Create(int indicator, int length) {
+Decoration *DecorationList::Create(int indicator, Sci::Position length) {
currentIndicator = indicator;
std::unique_ptr<Decoration> decoNew = std::make_unique<Decoration>(indicator);
decoNew->rs.InsertSpace(0, length);
@@ -90,7 +90,7 @@ void DecorationList::SetCurrentValue(int value) {
currentValue = value ? value : 1;
}
-bool DecorationList::FillRange(int &position, int value, int &fillLength) {
+bool DecorationList::FillRange(Sci::Position &position, int value, Sci::Position &fillLength) {
if (!current) {
current = DecorationFromIndicator(currentIndicator);
if (!current) {
@@ -104,7 +104,7 @@ bool DecorationList::FillRange(int &position, int value, int &fillLength) {
return changed;
}
-void DecorationList::InsertSpace(int position, int insertLength) {
+void DecorationList::InsertSpace(Sci::Position position, Sci::Position insertLength) {
const bool atEnd = position == lengthDocument;
lengthDocument += insertLength;
for (const std::unique_ptr<Decoration> &deco : decorationList) {
@@ -115,7 +115,7 @@ void DecorationList::InsertSpace(int position, int insertLength) {
}
}
-void DecorationList::DeleteRange(int position, int deleteLength) {
+void DecorationList::DeleteRange(Sci::Position position, Sci::Position deleteLength) {
lengthDocument -= deleteLength;
for (const std::unique_ptr<Decoration> &deco : decorationList) {
deco->rs.DeleteRange(position, deleteLength);
@@ -155,7 +155,7 @@ void DecorationList::SetView() {
}
}
-int DecorationList::AllOnFor(int position) const {
+int DecorationList::AllOnFor(Sci::Position position) const {
int mask = 0;
for (const std::unique_ptr<Decoration> &deco : decorationList) {
if (deco->rs.ValueAt(position)) {
@@ -167,7 +167,7 @@ int DecorationList::AllOnFor(int position) const {
return mask;
}
-int DecorationList::ValueAt(int indicator, int position) {
+int DecorationList::ValueAt(int indicator, Sci::Position position) {
const Decoration *deco = DecorationFromIndicator(indicator);
if (deco) {
return deco->rs.ValueAt(position);
@@ -175,7 +175,7 @@ int DecorationList::ValueAt(int indicator, int position) {
return 0;
}
-int DecorationList::Start(int indicator, int position) {
+Sci::Position DecorationList::Start(int indicator, Sci::Position position) {
const Decoration *deco = DecorationFromIndicator(indicator);
if (deco) {
return deco->rs.StartRun(position);
@@ -183,7 +183,7 @@ int DecorationList::Start(int indicator, int position) {
return 0;
}
-int DecorationList::End(int indicator, int position) {
+Sci::Position DecorationList::End(int indicator, Sci::Position position) {
const Decoration *deco = DecorationFromIndicator(indicator);
if (deco) {
return deco->rs.EndRun(position);