From 3534df9cfd2510535e8b69cb5b52c65cc3481081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Walle?= Date: Mon, 26 Nov 2012 17:39:08 +0100 Subject: [PATCH] Deliver if no comment starter was found Thanks to xckpd7 at #vim :) --- plugin/double-tap.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/double-tap.vim b/plugin/double-tap.vim index 6ff50cb..5a9e44f 100644 --- a/plugin/double-tap.vim +++ b/plugin/double-tap.vim @@ -53,7 +53,7 @@ function! s:Detect_empty_comment() let s:commStart[&ft] = matchstr(&comments, s:pattern) endif let line = getline('.') - if line =~ '^\s*'. s:commStart[&ft] . '\s*$' + if s:commStart[&ft] && line =~ '^\s*'. s:commStart[&ft] . '\s*$' return "\" else return "\"