From 9ee144e773b07b82287073d4b687a72f51c324a4 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Tue, 28 May 2013 19:24:58 +0900 Subject: [PATCH] - Fixed get_filetype(). --- autoload/neosnippet.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index d9c3e84..e483755 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -1051,9 +1051,14 @@ function! neosnippet#get_runtime_snippets_directory() "{{{ return copy(s:runtime_dir) endfunction"}}} function! neosnippet#get_filetype() "{{{ - return s:exists_context_filetype ? - \ context_filetype#get_filetype() : - \ (&filetype == '' ? 'nothing' : &filetype) + let context_filetype = + \ s:exists_context_filetype ? + \ context_filetype#get_filetype() : &filetype + if context_filetype == '' + let context_filetype = 'nothing' + endif + + return context_filetype endfunction"}}} function! s:get_sources_filetypes(filetype) "{{{ return (exists('*neocomplcache#get_source_filetypes') ?