From ea6a4f76fa65151bd8e702b83a069514d93a1b34 Mon Sep 17 00:00:00 2001 From: Konstantin-Glukhov Date: Fri, 27 Jan 2023 19:01:58 +0900 Subject: [PATCH] Fix bug for unable to uncomment indented comments in vim files (#510) Closes https://github.com/preservim/nerdcommenter/issues/491 --- autoload/nerdcommenter.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/nerdcommenter.vim b/autoload/nerdcommenter.vim index eede622..7cc036b 100644 --- a/autoload/nerdcommenter.vim +++ b/autoload/nerdcommenter.vim @@ -2534,9 +2534,8 @@ function! s:IsDelimValid(delimiter, delIndx, line) abort return 0 endif - "if the delimiter is on the very first char of the line or is the - "first non-tab/space char on the line then it is a valid comment delimiter - if a:delIndx ==# 0 || a:line =~# "^\s\\{" . a:delIndx . "\\}\".*$" + # If delimiter is the first non-whitespace character it is valid + if a:line =~# '^\s*"' return 1 endif