mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.4737: // in JavaScript string recognized as comment
Problem: // in JavaScript string recognized as comment. Solution: Only check for linecomment if 'cindent' is set. (closes #10151)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user