Merge pull request #1103 from vphilippon/master

Fix : Close Preview Window after insertion.
This commit is contained in:
Val Markovic 2014-07-28 11:21:42 -07:00
commit 221540e0b0

View File

@ -21,7 +21,6 @@ set cpo&vim
" This needs to be called outside of a function " This needs to be called outside of a function
let s:script_folder_path = escape( expand( '<sfile>:p:h' ), '\' ) let s:script_folder_path = escape( expand( '<sfile>:p:h' ), '\' )
let s:searched_and_results_found = 0
let s:omnifunc_mode = 0 let s:omnifunc_mode = 0
let s:old_cursor_position = [] let s:old_cursor_position = []
@ -518,11 +517,9 @@ function! s:ClosePreviewWindowIfNeeded()
return return
endif endif
if s:searched_and_results_found
" This command does the actual closing of the preview window. If no preview " This command does the actual closing of the preview window. If no preview
" window is shown, nothing happens. " window is shown, nothing happens.
pclose pclose
endif
endfunction endfunction
@ -633,7 +630,6 @@ EOF
function! s:GetCompletions() function! s:GetCompletions()
py results = GetCompletionsInner() py results = GetCompletionsInner()
let results = pyeval( 'results' ) let results = pyeval( 'results' )
let s:searched_and_results_found = len( results.words ) != 0
return results return results
endfunction endfunction