Skip to content

Commit

Permalink
fix for inc/dec operators and blocks (#811)
Browse files Browse the repository at this point in the history
* fix for inc/dec operators and blocks
1000th Commit!
  • Loading branch information
bounceme authored Jan 16, 2017
1 parent 18cbb4b commit 690f23e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions indent/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Language: Javascript
" Maintainer: Chris Paul ( https://github.com/bounceme )
" URL: https://github.com/pangloss/vim-javascript
" Last Change: December 31, 2016
" Last Change: January 16, 2017

" Only load this indent file when no other was loaded.
if exists('b:did_indent')
Expand Down Expand Up @@ -258,7 +258,8 @@ function s:IsBlock()
elseif char == ':'
return getline('.')[col('.')-2] != ':' && s:label_col()
endif
return syn =~? 'regex' || char !~ '[-=~!<*+,/?^%|&([]'
return syn =~? 'regex' || char !~ '[=~!<*,/?^%|&([]' &&
\ (char !~ '[-+]' || l:n != line('.') && getline('.')[col('.')-2] == char)
endif
endfunction

Expand Down

0 comments on commit 690f23e

Please sign in to comment.