diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-03-09 21:05:33 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-03-09 21:05:33 +1100 |
| commit | aae86a999fe82ab85660991892253040126386b8 (patch) | |
| tree | 1c82cf445ee7f3d0e9644a9a97bf978798479e84 /src/Decoration.h | |
| parent | 2d698add257d0bbb38335659ed944e9cc41fe593 (diff) | |
| download | scintilla-mirror-aae86a999fe82ab85660991892253040126386b8.tar.gz | |
Use Position/Line/int more accurately in preparation for large documents.
Diffstat (limited to 'src/Decoration.h')
| -rw-r--r-- | src/Decoration.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Decoration.h b/src/Decoration.h index 79ee9ef73..0d799920e 100644 --- a/src/Decoration.h +++ b/src/Decoration.h @@ -12,7 +12,7 @@ namespace Scintilla { class Decoration { int indicator; public: - RunStyles<int, int> rs; + RunStyles<Sci::Position, int> rs; explicit Decoration(int indicator_); ~Decoration(); @@ -27,14 +27,14 @@ class DecorationList { int currentIndicator; int currentValue; Decoration *current; // Cached so FillRange doesn't have to search for each call. - int lengthDocument; + Sci::Position lengthDocument; // Ordered by indicator std::vector<std::unique_ptr<Decoration>> decorationList; std::vector<const Decoration*> decorationView; // Read-only view of decorationList bool clickNotified; Decoration *DecorationFromIndicator(int indicator); - Decoration *Create(int indicator, int length); + Decoration *Create(int indicator, Sci::Position length); void Delete(int indicator); void DeleteAnyEmpty(); void SetView(); @@ -52,17 +52,17 @@ public: int GetCurrentValue() const { return currentValue; } // Returns true if some values may have changed - bool FillRange(int &position, int value, int &fillLength); + bool FillRange(Sci::Position &position, int value, Sci::Position &fillLength); - void InsertSpace(int position, int insertLength); - void DeleteRange(int position, int deleteLength); + void InsertSpace(Sci::Position position, Sci::Position insertLength); + void DeleteRange(Sci::Position position, Sci::Position deleteLength); void DeleteLexerDecorations(); - int AllOnFor(int position) const; - int ValueAt(int indicator, int position); - int Start(int indicator, int position); - int End(int indicator, int position); + int AllOnFor(Sci::Position position) const; + int ValueAt(int indicator, Sci::Position position); + Sci::Position Start(int indicator, Sci::Position position); + Sci::Position End(int indicator, Sci::Position position); bool ClickNotified() const { return clickNotified; |
