diff runtime/indent/postscr.vim @ 11518:63b0b7b79b25

Update runtime files. commit https://github.com/vim/vim/commit/3ec574f2b549f456f664f689d6da36dc5719aeb9 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 13 18:12:01 2017 +0200 Update runtime files. Includes changing &sw to shiftwidth() for all indent scripts.
author Christian Brabandt <cb@256bit.org>
date Tue, 13 Jun 2017 18:15:04 +0200
parents 3fc0f57ecb91
children 9c221ad9634a
line wrap: on
line diff
--- a/runtime/indent/postscr.vim
+++ b/runtime/indent/postscr.vim
@@ -41,16 +41,16 @@ function! PostscrIndentGet(lnum)
 
   " Indent for dicts, arrays, and saves with possible trailing comment
   if pline =~ '\(begin\|<<\|g\=save\|{\|[\)\s*\(%.*\)\=$'
-    let ind = ind + &sw
+    let ind = ind + shiftwidth()
   endif
 
   " Remove indent for popped dicts, and restores.
   if pline =~ '\(end\|g\=restore\)\s*$'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
 
   " Else handle immediate dedents of dicts, restores, and arrays.
   elseif getline(a:lnum) =~ '\(end\|>>\|g\=restore\|}\|]\)'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
 
   " Else handle DSC comments - always start of line.
   elseif getline(a:lnum) =~ '^\s*%%'