From f0ef14669fbf40bfc647b7f3e8bf20acee3a36f1 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 4 Nov 2013 13:53:57 -0800 Subject: [PATCH] Handle override blocks starting at the beginning of the line correctly --- aegisub/src/command/edit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aegisub/src/command/edit.cpp b/aegisub/src/command/edit.cpp index 934822d52..2c0a5b8b8 100644 --- a/aegisub/src/command/edit.cpp +++ b/aegisub/src/command/edit.cpp @@ -164,8 +164,8 @@ int block_at_pos(std::string const& text, int pos) { bool in_block = false; for (int i = 0; i <= pos && i <= max; ++i) { - if (i > 0 && text[i] == '{') { - if (!in_block) + if (text[i] == '{') { + if (!in_block && i > 0) ++n; in_block = true; }