From 9c5ac40e9ddc841885895a30655a514cef04b713 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Wed, 5 Jun 2013 11:30:54 +0900 Subject: [PATCH] - Optimized neocomplete source. --- autoload/neocomplete/sources/neosnippet.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autoload/neocomplete/sources/neosnippet.vim b/autoload/neocomplete/sources/neosnippet.vim index 7ee5257..33fc276 100644 --- a/autoload/neocomplete/sources/neosnippet.vim +++ b/autoload/neocomplete/sources/neosnippet.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: neosnippet.vim " AUTHOR: Shougo Matsushita -" Last Modified: 29 May 2013. +" Last Modified: 05 Jun 2013. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -41,9 +41,11 @@ function! s:source.hooks.on_init(context) "{{{ endfunction"}}} function! s:source.gather_candidates(context) "{{{ - let candidates = values(neosnippet#get_snippets()) + return values(neosnippet#get_snippets()) +endfunction"}}} - for snippet in candidates +function! s:source.hooks.on_post_filter(context) "{{{ + for snippet in a:context.candidates let snippet.dup = 1 let snippet.menu = neosnippet#util#strwidthpart( \ snippet.menu_template, winwidth(0)/3)