Reset syntax highlighter state at the end of override blocks correctly

With incomplete (or possibly incomplete for \r and \fn) tags at the end
of an override block, the text at the beginning of the next override
block was being incorrectly parsed as part of that tag.

Originally committed to SVN as r6317.
This commit is contained in:
Thomas Goyne 2012-01-19 19:46:09 +00:00
parent 6a091e3ba2
commit 6e09fb1abf
1 changed files with 4 additions and 1 deletions

View File

@ -317,12 +317,15 @@ void SubsTextEditCtrl::UpdateStyle() {
if (cur_char == '{') { if (cur_char == '{') {
new_style = in_ovr ? STYLE_ERROR : STYLE_OVERRIDE; new_style = in_ovr ? STYLE_ERROR : STYLE_OVERRIDE;
in_ovr = true; in_ovr = true;
in_parens = false;
} }
// End override block // End override block
else if (cur_char == '}') { else if (cur_char == '}') {
new_style = in_ovr ? STYLE_OVERRIDE : STYLE_ERROR; new_style = in_ovr ? STYLE_OVERRIDE : STYLE_ERROR;
in_ovr = false; in_ovr = false;
in_karaoke_template = false;
in_parens = false;
in_unparened_arg = false;
} }
// Start karaoke template // Start karaoke template
else if (templateLine && style != STYLE_KARAOKE_TEMPLATE && cur_char == '!') { else if (templateLine && style != STYLE_KARAOKE_TEMPLATE && cur_char == '!') {