diff options
author | nyamatongwe <devnull@localhost> | 2013-06-18 15:31:22 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-06-18 15:31:22 +1000 |
commit | 9afa4a694847e054ef9d5308a29df5d97fd55a9f (patch) | |
tree | 7662684cf1c5fe48781d1861dc670017e06e5f57 | |
parent | 82eecd91fd37c732f492eeec808a0b65d36e1707 (diff) | |
download | scintilla-mirror-9afa4a694847e054ef9d5308a29df5d97fd55a9f.tar.gz |
Method added to help lexers working with byte positions.
Related to bug [#1483].
-rw-r--r-- | lexlib/StyleContext.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index 319f51088..2c010645b 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -176,6 +176,12 @@ public: Forward(); } } + void ForwardBytes(int nb) { + size_t forwardPos = currentPos + nb; + while (forwardPos > currentPos) { + Forward(); + } + } void ChangeState(int state_) { state = state_; } |