Permalink
Browse files

another fix to the intent stl flag

Dont even consider leading spaces that could potentially be used
alignment in the first indent column. This simplifies the code and
eliminates another [mixed-indenting] false positive hit.
  • Loading branch information...
1 parent b4ad446 commit 01e5c6e4d1b0e91ff243fdb5e07083c881df402e @scrooloose committed Jun 30, 2010
Showing with 3 additions and 12 deletions.
  1. +3 −12 vimrc
View
15 vimrc
@@ -108,21 +108,12 @@ function! StatuslineTabWarning()
endif
let tabs = search('^\t', 'nw') != 0
- let spaces = search('^ ', 'nw') != 0
+ "find spaces that arent used as alignment in the first indent column
+ let spaces = search('^ \{' . &ts . ',}[^\t]', 'nw') != 0
if tabs && spaces
-
- if &et
- let b:statusline_tab_warning = '[mixed-indenting]'
- else
- "if using tabs, allow alignment at the start of the line
- "of up to one &ts width
- if search('^ \{' . &ts . ',}', 'nw') != 0
- let b:statusline_tab_warning = '[mixed-indenting]'
- endif
- endif
-
+ let b:statusline_tab_warning = '[mixed-indenting]'
elseif (spaces && !&et) || (tabs && &et)
let b:statusline_tab_warning = '[&et]'
endif

0 comments on commit 01e5c6e

Please sign in to comment.