bugfix: fixed another infinite loop when detecting sexy comments

This commit is contained in:
Martin Grenfell 2008-04-28 22:40:51 +12:00
parent f5092782ee
commit 3eb5a0fcde

View File

@ -2325,7 +2325,7 @@ function s:FindBoundingLinesOfSexyCom(lineNum)
let theLine = getline(currentLine)
"check if the current line is the top of the sexy comment
if theLine =~ '^[ \t]*' . left && theLine !~ '.*' . right && currentLine < s:NumLinesInBuf()
if currentLine <= a:lineNum && theLine =~ '^[ \t]*' . left && theLine !~ '.*' . right && currentLine < s:NumLinesInBuf()
let top = currentLine
let currentLine = a:lineNum