Updated runtime files.
diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim
index 203d734..11ad3ad 100644
--- a/runtime/ftplugin/cobol.vim
+++ b/runtime/ftplugin/cobol.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: cobol
" Author: Tim Pope <vimNOSPAM@tpope.info>
-" $Id: cobol.vim,v 1.1 2007/05/05 17:24:38 vimboss Exp $
+" Last Update: By ZyX: use shiftwidth()
" Insert mode mappings: <C-T> <C-D> <Tab>
" Normal mode mappings: < > << >> [[ ]] [] ][
@@ -113,7 +113,7 @@
function! s:increase(...)
let lnum = '.'
- let sw = &shiftwidth
+ let sw = shiftwidth()
let i = a:0 ? a:1 : indent(lnum)
if i >= 11
return sw - (i - 11) % sw
@@ -128,7 +128,7 @@
function! s:decrease(...)
let lnum = '.'
- let sw = &shiftwidth
+ let sw = shiftwidth()
let i = indent(a:0 ? a:1 : lnum)
if i >= 11 + sw
return 1 + (i + 12) % sw
@@ -147,7 +147,7 @@
let head = strpart(getline('.'),0,7)
let tail = strpart(getline('.'),7)
let indent = match(tail,'[^ ]')
- let sw = &shiftwidth
+ let sw = shiftwidth()
let shift = a:shift
if shift > 0
if indent < 4
@@ -221,7 +221,8 @@
function! s:Tab()
if (strpart(getline('.'),0,col('.')-1) =~ '^\s*$' && &sta)
return s:IncreaseIndent()
- elseif &sts == &sw && &sts != 8 && &et
+ " &softtabstop < 0: &softtabstop follows &shiftwidth
+ elseif (&sts < 0 || &sts == shiftwidth()) && &sts != 8 && &et
return s:repeat(" ",s:increase(col('.')-1))
else
return "\<Tab>"