Fix character selection when using VISUAL on all platforms (#926)
This commit is contained in:
parent
539c557680
commit
23b9f11b7a
@ -15,7 +15,6 @@ from UltiSnips import _vim
|
|||||||
from UltiSnips.indent_util import IndentUtil
|
from UltiSnips.indent_util import IndentUtil
|
||||||
from UltiSnips.text_objects._transformation import TextObjectTransformation
|
from UltiSnips.text_objects._transformation import TextObjectTransformation
|
||||||
from UltiSnips.text_objects._base import NoneditableTextObject
|
from UltiSnips.text_objects._base import NoneditableTextObject
|
||||||
import platform
|
|
||||||
|
|
||||||
_REPLACE_NON_WS = re.compile(r"[^ \t]")
|
_REPLACE_NON_WS = re.compile(r"[^ \t]")
|
||||||
|
|
||||||
@ -43,8 +42,8 @@ class Visual(NoneditableTextObject, TextObjectTransformation):
|
|||||||
|
|
||||||
def _update(self, done):
|
def _update(self, done):
|
||||||
if self._mode == 'v': # Normal selection.
|
if self._mode == 'v': # Normal selection.
|
||||||
if platform.system() == 'Windows':
|
# Remove last character when selection mode is 'exclusive'
|
||||||
# Remove last character for windows in normal selection.
|
if _vim.eval('&selection') == 'exclusive':
|
||||||
text = self._text[:-1]
|
text = self._text[:-1]
|
||||||
else:
|
else:
|
||||||
text = self._text
|
text = self._text
|
||||||
|
Loading…
Reference in New Issue
Block a user