Commits

Evgeny Podjachev  committed 75ef70a

Version 1.3.1: Disabled work of AutoComplPop plugin in YATE buffer.

  • Participants
  • Parent commits 9da2b8b

Comments (0)

Files changed (1)

File plugin/yate.vim

 " 				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
 endfun
 
 fun <SID>OnCursorMoved()
-	let l = getpos(".")[1]
-	if l > 1
+	if line('.') > 1
 		setlocal cul
 		setlocal noma
 		
 endfun
 
 fun <SID>OnCursorMovedI()
-	let l = getpos(".")[1]
-	if l > 1
+	if line('.') > 1
 		setlocal cul
 		setlocal noma
 		
 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'
 
 		setlocal noswapfile
 		setlocal nonumber
 
-		let s:prev_mode = mode()
-		exe 'startinsert'
-
 		if g:YATE_clear_search_string
 			let s:user_line = ''
 			let s:tags_list = []
 			autocmd BufEnter <buffer> call <SID>OnBufEnter()
 		endif
 		
-		cal <SID>PrintTagsList()
+		cal <SID>OnBufEnter()
 	else
 		exe ':wincmd p'
 		exe ':'.s:yate_winnr.'bd!'