diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-01-23 21:09:23 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-01-23 21:09:23 +0100 |
commit | 6745c49110838db9ac39e85bbcf690b40bc20f83 (patch) | |
tree | 3b1c42f67bacb5ddb5b6afc5b4610f4c238877a7 /indent/javascript.vim | |
parent | 1a97304cf642e9f887122e162b1999768b60c9d7 (diff) | |
download | vim-polyglot-1.11.2.tar.gz vim-polyglot-1.11.2.zip |
Update all packagesv1.11.2
Diffstat (limited to 'indent/javascript.vim')
-rw-r--r-- | indent/javascript.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indent/javascript.vim b/indent/javascript.vim index 5cde88d1..d483409e 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -443,11 +443,17 @@ function! Fixedgq(lnum, count) let l:tw = &tw ? &tw : 80; let l:count = a:count + let l:first_char = indent(a:lnum) + 1 if mode() == 'i' " gq was not pressed, but tw was set return 1 endif + " This gq is only meant to do code with strings, not comments + if s:IsLineComment(a:lnum, l:first_char) || s:IsInMultilineComment(a:lnum, l:first_char) + return 1 + endif + if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq return 1 endif |