Skip to content

Commit

Permalink
Remove autocommand, is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbra committed Mar 9, 2013
1 parent f35becd commit 63bdc03
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions autoload/ftimproved.vim
Expand Up @@ -165,7 +165,6 @@ fun! ftimproved#FTCommand(f, fwd, mode) "{{{1
let char = '\c'.char
endif
if get(g:, "ft_improved_multichars", 0)
call <sid>ftAutocmd(1) " Make sure highlighting will be removed, in case of errors
call <sid>HighlightMatch(char)
let next = getchar()
while !empty(next) && ( next >= 0x20 ||
Expand Down Expand Up @@ -284,7 +283,6 @@ fun! ftimproved#FTCommand(f, fwd, mode) "{{{1
return res ":call histdel('/', -1)\n"
finally
call <sid>HighlightMatch('')
call <sid>ftAutocmd(0)
endtry
endfun

Expand Down Expand Up @@ -324,26 +322,6 @@ fun! <sid>Unmap(lhs) "{{{1
endif
endfun

fun! <sid>ftAutocmd(enable) "{{{1
if (a:enable)
if !exists("#FTImproved#CursorHold")
" Makes sure, highlighting is eventually removed, even if the user
" exited from FTCommand by hitting <ctrl-c>
augroup FTImproved
au!
au CursorHold * :call <sid>HighlightMatch('')
augroup END
endif
else
if exists("#FTImproved#CursorHold")
augroup FTImproved
au!
augroup END
augroup! FTImproved
endif
endif
endfu

fun! ftimproved#Activate(enable) "{{{1
if a:enable
" Disable the remapping of those keys by the yankring plugin
Expand Down

0 comments on commit 63bdc03

Please sign in to comment.