forked from mia/Aegisub
Handle override blocks starting at the beginning of the line correctly
This commit is contained in:
parent
10cbff0ee2
commit
f0ef14669f
1 changed files with 2 additions and 2 deletions
|
@ -164,8 +164,8 @@ int block_at_pos(std::string const& text, int pos) {
|
||||||
bool in_block = false;
|
bool in_block = false;
|
||||||
|
|
||||||
for (int i = 0; i <= pos && i <= max; ++i) {
|
for (int i = 0; i <= pos && i <= max; ++i) {
|
||||||
if (i > 0 && text[i] == '{') {
|
if (text[i] == '{') {
|
||||||
if (!in_block)
|
if (!in_block && i > 0)
|
||||||
++n;
|
++n;
|
||||||
in_block = true;
|
in_block = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue