Permalink
Browse files

Version 1.3.1: Disabled AutoComplPop plugin in YATE buffer.

  • Loading branch information...
1 parent 374057b commit c9d3b5ebad18d4963c3b276ac29175a980684a9e @madevgeny madevgeny committed with Jul 20, 2012
Showing with 16 additions and 10 deletions.
  1. +16 −10 plugin/yate.vim
View
26 plugin/yate.vim
@@ -53,9 +53,11 @@
" search string. Autocompletion using history also works by
" <Ctrl-X><Ctrl-U>.
"
-" Version: 1.3.0
+" Version: 1.3.1
"
-" ChangeLog: 1.3.0: Added parameter g:YATE_clear_search_string to control
+" ChangeLog: 1.3.1: Disabled work of AutoComplPop plugin in YATE buffer.
+"
+" 1.3.0: Added parameter g:YATE_clear_search_string to control
" clearing of search string on next YATE buffer invocation.
" Pressing <Enter> in search string if length of search
" string is more or equal g:YATE_min_symbols_to_search
@@ -342,8 +344,7 @@ fun <SID>GenerateTagsListCB()
cal <SID>GenerateTagsList(getline('.'),1)
endfun
-fun <SID>OnCursorMoved()
- let l = getpos(".")[1]
+fun <SID>OnCursorMoved()
if line('.') > 1
setlocal cul
setlocal noma
@@ -357,8 +358,7 @@ fun <SID>OnCursorMoved()
endif
endfun
-fun <SID>OnCursorMovedI()
- let l = getpos(".")[1]
+fun <SID>OnCursorMovedI()
if line('.') > 1
setlocal cul
setlocal noma
@@ -389,12 +389,21 @@ fun <SID>GotoTagE()
cal <SID>GotoTag('e')
endfun
+fun <SID>OnBufLeave()
+ " Enable acp.vim plugin.
+ if exists(':AcpUnlock')
+ exe 'AcpUnlock'
endif
if s:prev_mode != 'i'
exe 'stopinsert'
endif
endfun
+fun <SID>OnBufEnter()
+ " Disable acp.vim plugin as cursor callbacks doesn't work if popup menu is
+ " shown.
+ if exists(':AcpLock')
+ exe 'AcpLock'
endif
let s:prev_mode = mode()
exe 'startinsert'
@@ -443,9 +452,6 @@ fun! <SID>ToggleTagExplorerBuffer()
setlocal buftype=nofile
setlocal noswapfile
setlocal nonumber
-
- let s:prev_mode = mode()
- exe 'startinsert'
if g:YATE_clear_search_string
let s:user_line = ''
@@ -463,7 +469,7 @@ fun! <SID>ToggleTagExplorerBuffer()
autocmd VimResized <buffer> call <SID>PrintTagsList()
autocmd BufEnter <buffer> call <SID>OnBufEnter()
endif
-
+
cal <SID>OnBufEnter()
else
exe ':wincmd p'

0 comments on commit c9d3b5e

Please sign in to comment.