From cd99bdd3b3d566dd4cd75636d2de00e6e710dfe1 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sat, 22 Mar 2014 19:47:59 +0100 Subject: [PATCH] selection=old cannot work with UltiSnips. Kind of fixes #173. --- pythonx/UltiSnips/_vim.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pythonx/UltiSnips/_vim.py b/pythonx/UltiSnips/_vim.py index f71b2f8..437cd8f 100644 --- a/pythonx/UltiSnips/_vim.py +++ b/pythonx/UltiSnips/_vim.py @@ -117,6 +117,10 @@ def select(start, end): """Select the span in Select mode""" _unmap_select_mode_mapping() + selection = eval("&selection") + if "old" in selection: + raise RuntimeError("selection=old does not work with UltiSnips :(.") + col = col2byte(start.line + 1, start.col) vim.current.window.cursor = start.line + 1, col @@ -134,7 +138,7 @@ def select(start, end): else: # Non zero length, use Visual selection. move_cmd += "v" - if "inclusive" in eval("&selection"): + if "inclusive" in selection: if end.col == 0: move_cmd += "%iG$" % end.line else: