aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2008-07-26 11:21:28 +0000
committernyamatongwe <devnull@localhost>2008-07-26 11:21:28 +0000
commitd4f809e3c597f6291b3f75ef8e129f39bc24b184 (patch)
tree235f7048216ac6af73af2e440494d91f2c1ef8a0 /src
parentf068fea7885ea056e90e1a264c76f7c793320351 (diff)
downloadscintilla-mirror-d4f809e3c597f6291b3f75ef8e129f39bc24b184.tar.gz
Update from Yuval Papish in Feature Request #2023217
Improved handling of the ~ sign. It recognizes special character handling using ~, e.g.: ~" Also a better support for line continuation.
Diffstat (limited to 'src')
-rw-r--r--src/LexProgress.cxx27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/LexProgress.cxx b/src/LexProgress.cxx
index 3b3a44541..c21356960 100644
--- a/src/LexProgress.cxx
+++ b/src/LexProgress.cxx
@@ -65,21 +65,24 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo
// Handle line continuation generically.
if (sc.ch == '~') {
- // Skip whitespace between ~ and EOL
- /* do {
+ if (sc.chNext > ' ') {
+ // skip special char after ~
sc.Forward();
- } */
- while ((sc.chNext == ' ' || sc.chNext == '\t') ) {
- sc.Forward();
- sc.More();
+ continue;
}
- if (sc.chNext == '\n' || sc.chNext == '\r') {
- sc.Forward();
- if (sc.ch == '\r' && sc.chNext == '\n') {
+ else {
+ // Skip whitespace between ~ and EOL
+ while (sc.More() && (sc.chNext == ' ' || sc.chNext == '\t') ) {
sc.Forward();
}
- sc.Forward();
- continue;
+ if (sc.chNext == '\n' || sc.chNext == '\r') {
+ sc.Forward();
+ if (sc.ch == '\r' && sc.chNext == '\n') {
+ sc.Forward();
+ }
+ sc.Forward();
+ continue;
+ }
}
}
// Determine if a new state should be terminated.
@@ -269,3 +272,5 @@ static const char * const FglWordLists[] = {
};
LexerModule lmProgress(SCLEX_PS, Colourise4glDoc, "progress", Fold4glDoc, FglWordLists);
+
+