From 6e09fb1abfe01c533bbaf8059a91b9941905f0a3 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 19 Jan 2012 19:46:09 +0000 Subject: [PATCH] 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. --- aegisub/src/subs_edit_ctrl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aegisub/src/subs_edit_ctrl.cpp b/aegisub/src/subs_edit_ctrl.cpp index 7f01610f1..ca637ce7f 100644 --- a/aegisub/src/subs_edit_ctrl.cpp +++ b/aegisub/src/subs_edit_ctrl.cpp @@ -317,12 +317,15 @@ void SubsTextEditCtrl::UpdateStyle() { if (cur_char == '{') { new_style = in_ovr ? STYLE_ERROR : STYLE_OVERRIDE; in_ovr = true; - in_parens = false; } // End override block else if (cur_char == '}') { new_style = in_ovr ? STYLE_OVERRIDE : STYLE_ERROR; in_ovr = false; + + in_karaoke_template = false; + in_parens = false; + in_unparened_arg = false; } // Start karaoke template else if (templateLine && style != STYLE_KARAOKE_TEMPLATE && cur_char == '!') {