selection=old cannot work with UltiSnips.

Kind of fixes #173.
This commit is contained in:
Holger Rapp 2014-03-22 19:47:59 +01:00
parent 69e0acd58a
commit cd99bdd3b3

View File

@ -117,6 +117,10 @@ def select(start, end):
"""Select the span in Select mode""" """Select the span in Select mode"""
_unmap_select_mode_mapping() _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) col = col2byte(start.line + 1, start.col)
vim.current.window.cursor = start.line + 1, col vim.current.window.cursor = start.line + 1, col
@ -134,7 +138,7 @@ def select(start, end):
else: else:
# Non zero length, use Visual selection. # Non zero length, use Visual selection.
move_cmd += "v" move_cmd += "v"
if "inclusive" in eval("&selection"): if "inclusive" in selection:
if end.col == 0: if end.col == 0:
move_cmd += "%iG$" % end.line move_cmd += "%iG$" % end.line
else: else: