aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexHaskell.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexHaskell.cxx')
-rw-r--r--lexers/LexHaskell.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexers/LexHaskell.cxx b/lexers/LexHaskell.cxx
index e56906b81..9b4ad14e9 100644
--- a/lexers/LexHaskell.cxx
+++ b/lexers/LexHaskell.cxx
@@ -597,7 +597,8 @@ void SCI_METHOD LexerHaskell::Lex(unsigned int startPos, int length, int initSty
hs.lmode = LITERATE_BIRD;
}
// Preprocessor
- else if (sc.atLineStart && sc.ch == '#' && options.cpp) {
+ else if (sc.atLineStart && sc.ch == '#' && options.cpp
+ && (!options.stylingWithinPreprocessor || sc.state == SCE_HA_DEFAULT)) {
sc.SetState(SCE_HA_PREPROCESSOR);
sc.Forward();
}
@@ -960,7 +961,6 @@ void SCI_METHOD LexerHaskell::Lex(unsigned int startPos, int length, int initSty
sc.Forward();
}
}
- styler.SetLineState(lineCurrent, hs.ToLineState());
sc.Complete();
}