aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/StyleContext.h
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-06-18 15:31:22 +1000
committernyamatongwe <devnull@localhost>2013-06-18 15:31:22 +1000
commit9afa4a694847e054ef9d5308a29df5d97fd55a9f (patch)
tree7662684cf1c5fe48781d1861dc670017e06e5f57 /lexlib/StyleContext.h
parent82eecd91fd37c732f492eeec808a0b65d36e1707 (diff)
downloadscintilla-mirror-9afa4a694847e054ef9d5308a29df5d97fd55a9f.tar.gz
Method added to help lexers working with byte positions.
Related to bug [#1483].
Diffstat (limited to 'lexlib/StyleContext.h')
-rw-r--r--lexlib/StyleContext.h6
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_;
}