From af2f762e07989d75910f9d2d4e19dc8bada6b10f Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 21 May 2012 14:54:25 +0200 Subject: [PATCH] avoid crashing if trig list is empty --- plugin/UltiSnips/_vim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/UltiSnips/_vim.py b/plugin/UltiSnips/_vim.py index b2e9a3f..18be1df 100755 --- a/plugin/UltiSnips/_vim.py +++ b/plugin/UltiSnips/_vim.py @@ -225,7 +225,10 @@ def _unmap_select_mode_mapping(): for m in maps: # The first three chars are the modes, that might be listed. # We are not interested in them here. - trig = m[3:].split()[0] + trig = m[3:].split()[0] if len(m[3:].split()) != 0 else None + + if trig is None: + continue # The bar separates commands if trig[-1] == "|":