aboutsummaryrefslogtreecommitdiff
path: root/runtime/indent/json.vim
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-12-03 16:49:30 +0300
committerZyX <kp-pav@yandex.ru>2017-12-03 16:49:30 +0300
commitc49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57 (patch)
treeb7e59c416d1435725c65f8952b6e55c70544d97e /runtime/indent/json.vim
parent62108c3b0be46936c83f6d4c98b44ceb5e6f77fd (diff)
parent27a577586eace687c47e7398845178208cae524a (diff)
downloadrneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.gz
rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.bz2
rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.zip
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'runtime/indent/json.vim')
-rw-r--r--runtime/indent/json.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/indent/json.vim b/runtime/indent/json.vim
index 649f2b8aa5..b66a03d81b 100644
--- a/runtime/indent/json.vim
+++ b/runtime/indent/json.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: JSON
" Mantainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json
-" Last Change: 2014 Aug 29
+" Last Change: 2017 Jun 13
" https://github.com/jakar/vim-json/commit/20b650e22aa750c4ab6a66aa646bdd95d7cd548a#diff-e81fc111b2052e306d126bd9989f7b7c
" Original Author: Rogerz Zhang <rogerz.zhang at gmail.com> http://github.com/rogerz/vim-json
" Acknowledgement: Based off of vim-javascript maintained by Darrick Wiebe
@@ -141,7 +141,7 @@ function GetJSONIndent()
" If the previous line ended with a block opening, add a level of indent.
" if s:Match(lnum, s:block_regex)
- " return indent(lnum) + &sw
+ " return indent(lnum) + shiftwidth()
" endif
" If the previous line contained an opening bracket, and we are still in it,
@@ -149,7 +149,7 @@ function GetJSONIndent()
if line =~ '[[({]'
let counts = s:LineHasOpeningBrackets(lnum)
if counts[0] == '1' || counts[1] == '1' || counts[2] == '1'
- return ind + &sw
+ return ind + shiftwidth()
else
call cursor(v:lnum, vcol)
end