summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c
index f8d50d1e5b4..3f6058e3b1a 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2344,8 +2344,6 @@ between them, return t; otherwise return nil. */)
while (1)
{
DEC_BOTH (from, from_byte);
- if (from == stop)
- break;
UPDATE_SYNTAX_TABLE_BACKWARD (from);
c = FETCH_CHAR_AS_MULTIBYTE (from_byte);
if (SYNTAX (c) == Scomment_fence
@@ -2354,6 +2352,8 @@ between them, return t; otherwise return nil. */)
found = 1;
break;
}
+ else if (from == stop)
+ break;
}
if (found == 0)
{
@@ -2361,6 +2361,9 @@ between them, return t; otherwise return nil. */)
from_byte = ini_byte;
goto leave;
}
+ else
+ /* We have skipped one comment. */
+ break;
}
else if (code == Sendcomment)
{