diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-04-11 17:36:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-11 17:36:37 +0100 |
commit | 1655619717ff109ea8bf1002883636d5af345e48 (patch) | |
tree | 56c67651f11728e39f65ec2a52e85187d983db42 /src/change.c | |
parent | 825b55e695b842beb6515ec5c53583aac9efe7b7 (diff) |
patch 8.2.4737: // in JavaScript string recognized as commentv8.2.4737
Problem: // in JavaScript string recognized as comment.
Solution: Only check for linecomment if 'cindent' is set. (closes #10151)
Diffstat (limited to 'src/change.c')
-rw-r--r-- | src/change.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/change.c b/src/change.c index bc9195be44..259f07664a 100644 --- a/src/change.c +++ b/src/change.c @@ -1659,7 +1659,7 @@ open_line( lead_len = get_leader_len(saved_line, &lead_flags, dir == BACKWARD, TRUE); #ifdef FEAT_CINDENT - if (lead_len == 0 && do_cindent && dir == FORWARD) + if (lead_len == 0 && curbuf->b_p_cin && do_cindent && dir == FORWARD) { // Check for a line comment after code. comment_start = check_linecomment(saved_line); |