mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 09:53:47 -05:00
Fix support for embedded lua in vimscript (#513)
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
This commit is contained in:
@@ -2524,8 +2524,9 @@ function! s:IsDelimValid(delimiter, delIndx, line) abort
|
||||
|
||||
"vim comments are so fucking stupid!! Why the hell do they have comment
|
||||
"delimiters that are used elsewhere in the syntax?!?! We need to check
|
||||
"some conditions especially for vim
|
||||
if &filetype ==# 'vim'
|
||||
"some conditions especially for vim.
|
||||
"Also check &commentstring because it may be overwritten for embedded lua.
|
||||
if &filetype ==# 'vim' && &commentstring[0] ==# '"'
|
||||
if !s:IsNumEven(s:CountNonESCedOccurances(preComStr, '"', "\\"))
|
||||
return 0
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user