1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## detectindent_fix.dpatch by Antonio Terceiro <terceiro@softwarelivre.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad vim-scripts.svn~/plugin/detectindent.vim vim-scripts.svn/plugin/detectindent.vim
--- vim-scripts.svn~/plugin/detectindent.vim 2008-03-20 19:12:27.000000000 -0300
+++ vim-scripts.svn/plugin/detectindent.vim 2008-03-30 18:34:28.677760572 -0300
@@ -86,7 +86,7 @@
if l:has_leading_tabs && ! l:has_leading_spaces
" tabs only, no spaces
set noexpandtab
- if exists("g:detectindent_preferred_tabsize")
+ if exists("g:detectindent_preferred_indent")
let &shiftwidth = g:detectindent_preferred_indent
let &tabstop = g:detectindent_preferred_indent
endif
@@ -95,6 +95,8 @@
" spaces only, no tabs
set expandtab
let &shiftwidth = l:shortest_leading_spaces_run
+ let &tabstop = l:shortest_leading_spaces_run
+ let &softtabstop = l:shortest_leading_spaces_run
elseif l:has_leading_spaces && l:has_leading_tabs
" spaces and tabs
@@ -109,12 +111,14 @@
else
let &tabstop = 8
endif
+ let &softtabstop = &tabstop
else
" no spaces, no tabs
- if exists("g:detectindent_preferred_tabsize")
+ if exists("g:detectindent_preferred_indent")
let &shiftwidth = g:detectindent_preferred_indent
let &tabstop = g:detectindent_preferred_indent
+ let &softtabstop = g:detectindent_preferred_indent
endif
if exists("g:detectindent_preferred_expandtab")
set expandtab
|