fixed 'toggle comment'

This commit is contained in:
mattn
2010-08-02 14:54:13 +09:00
parent be54da653a
commit 742e115a41
2 changed files with 4 additions and 1 deletions

1
docs

Submodule docs deleted from e28425ce02

View File

@@ -1633,6 +1633,10 @@ function! s:zen_toggleComment()
let pos2 = searchpos('</' . tag_name . '>', 'cneW')
endif
let block = [pos1, pos2]
if !s:region_is_valid(block)
call setpos('.', curpos)
let block = s:search_region('<!', '-->')
endif
if s:point_in_region(curpos[1:2], block)
let comment_region = s:search_region('<!--', '-->')
if !s:region_is_valid(comment_region) || !s:point_in_region(curpos[1:2], comment_region)