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; }