Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/autoload/caw.vim b/autoload/caw.vim
- index 49e8c7a..ce44bfd 100644
- --- a/autoload/caw.vim
- +++ b/autoload/caw.vim
- @@ -86,21 +86,24 @@ endfunction "}}}
- function! s:get_indent_num(lnum) "{{{
- - if has('cindent') && &syntax =~# '\<c\|cpp\>'
- - return cindent(a:lnum)
- - elseif has('lispindent') && &syntax =~# '\<lisp\|scheme\>'
- - return lispindent(a:lnum)
- - elseif &l:indentexpr != ''
- + if &l:indentexpr != ''
- let save_view = winsaveview()
- let save_lnum = v:lnum
- let v:lnum = a:lnum
- try
- return eval(&l:indentexpr)
- + catch
- + " fallback to other strategies...
- finally
- let v:lnum = save_lnum
- " NOTE: GetPythonIndent() moves cursor. wtf?
- call winrestview(save_view)
- endtry
- + endif
- + if has('cindent') && &syntax =~# '\<c\|cpp\>'
- + return cindent(a:lnum)
- + elseif has('lispindent') && &syntax =~# '\<lisp\|scheme\>'
- + return lispindent(a:lnum)
- else
- return indent(a:lnum)
- endif
Add Comment
Please, Sign In to add comment