Permalink
Browse files

Don't need to check if less than zero

prevnonblank and GetPrevNormalLine don't return anything less than zero
  • Loading branch information...
1 parent 5a03443 commit 87d995aa44e669e34e3e0bf959430da4aa0e744a @kchmck committed Jan 30, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 indent/coffee.vim
View
@@ -186,7 +186,7 @@ endfunction
function! s:GetPrevNormalLine(startlinenum)
let curlinenum = a:startlinenum
- while curlinenum > 0
+ while curlinenum
let curlinenum = prevnonblank(curlinenum - 1)
if !s:IsCommentLine(curlinenum)
@@ -259,7 +259,7 @@ function! GetCoffeeIndent(curlinenum)
if curline =~ '^when\>' && !s:SmartSearch(prevlinenum, '\<switch\>')
let linenum = a:curlinenum
- while linenum > 0
+ while linenum
let linenum = s:GetPrevNormalLine(linenum)
if getline(linenum) =~ '^\s*when\>'

0 comments on commit 87d995a

Please sign in to comment.