fixed 'toggle comment'

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

No files matched your search

Submodule docs deleted from e28425ce02.
+4
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)