From 248c70652343e18a027fa6b12f9fd8fb25705f19 Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Tue, 19 Apr 2016 17:55:59 -0700 Subject: [PATCH] Complain about missing Python support --- autoload/cpsm.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/cpsm.vim b/autoload/cpsm.vim index 8240594..4af8297 100644 --- a/autoload/cpsm.vim +++ b/autoload/cpsm.vim @@ -41,6 +41,9 @@ let s:script_dir = escape(expand(':p:h'), '\') execute 'pyfile ' . s:script_dir . '/cpsm.py' function cpsm#CtrlPMatch(items, str, limit, mmode, ispath, crfile, regex) + if !has('python') + return ['ERROR: cpsm requires Vim built with Python support'] + endif if empty(a:str) && g:cpsm_match_empty_query == 0 let s:results = a:items[0:(a:limit)] let s:regexes = []