aboutsummaryrefslogtreecommitdiff
path: root/runtime/indent/json.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-11-07 02:49:08 +0100
committerGitHub <noreply@github.com>2017-11-07 02:49:08 +0100
commitad527392abb60e19954d5e8dba05af282d67d15b (patch)
tree5a8ad20c8cc49b37593e8f1089420446b731b0d0 /runtime/indent/json.vim
parentdc9290109481e5e0d0c224fecb217ceb5a4c978d (diff)
parent20e317e22abeef20891eb70a18435559f7b09212 (diff)
downloadrneovim-ad527392abb60e19954d5e8dba05af282d67d15b.tar.gz
rneovim-ad527392abb60e19954d5e8dba05af282d67d15b.tar.bz2
rneovim-ad527392abb60e19954d5e8dba05af282d67d15b.zip
Merge #7499 'vim-patch: runtime'
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