Permalink
Browse files

Don't wrap GetCoffeeIndent

According to the help pages, indentexpr restores the cursor itself
  • Loading branch information...
1 parent 2a691d9 commit 8d34034797842e83c0962e997db81b7c647cbb6a @kchmck committed Jan 30, 2012
Showing with 1 addition and 10 deletions.
  1. +1 −10 indent/coffee.vim
View
@@ -237,7 +237,7 @@ function! s:GetTrimmedLine(linenum)
\ '\s\+$', '', '')
endfunction
-function! s:GetCoffeeIndent(curlinenum)
+function! GetCoffeeIndent(curlinenum)
let prevlinenum = s:GetPrevNormalLine(a:curlinenum)
" Don't do anything if there's no previous line.
@@ -340,12 +340,3 @@ function! s:GetCoffeeIndent(curlinenum)
return -1
endif
endfunction
-
-" Wrap s:GetCoffeeIndent to keep the cursor position.
-function! GetCoffeeIndent(curlinenum)
- let oldcursor = getpos('.')
- let indent = s:GetCoffeeIndent(a:curlinenum)
- call setpos('.', oldcursor)
-
- return indent
-endfunction

0 comments on commit 8d34034

Please sign in to comment.