diff --git a/runtime/autoload/htmlcomplete.vim b/runtime/autoload/htmlcomplete.vim
index 768afd5725..c7a43c3049 100644
--- a/runtime/autoload/htmlcomplete.vim
+++ b/runtime/autoload/htmlcomplete.vim
@@ -1,13 +1,14 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2006 Jan 22
+" Last Change: 2006 Jan 24
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
+ let curline = line('.')
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
let start -= 1
@@ -20,8 +21,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
let stylestart = searchpair('