summaryrefslogtreecommitdiffstats
path: root/vim/plugin
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-07 15:39:55 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-07 15:39:55 -0500
commit0a9c128b572626b2567debddc13865db05467e7e (patch)
tree6b63435535de069732e34c74d03bb79a22f356e5 /vim/plugin
parente859de754362a2348a4f4d5ef3014f516e0c791c (diff)
downloadconf-0a9c128b572626b2567debddc13865db05467e7e.tar.gz
conf-0a9c128b572626b2567debddc13865db05467e7e.zip
subtract 1 from the length rather than backspacing afterwards in visual mode
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/textobj.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/vim/plugin/textobj.vim b/vim/plugin/textobj.vim
index d6cde6b..e60abd8 100644
--- a/vim/plugin/textobj.vim
+++ b/vim/plugin/textobj.vim
@@ -32,6 +32,9 @@ function Textobj(char, callback)
if endcol == 0
set virtualedit=onemore
endif
+ if a:operator == 'v'
+ let objlength -= 1
+ endif
call cursor(startline, startcol)
if a:operator == 'c'
let operator = 'd'
@@ -42,8 +45,6 @@ function Textobj(char, callback)
if a:operator == 'c'
startinsert
- elseif a:operator == 'v'
- exe "normal! \<BS>"
endif
let &whichwrap = whichwrap
let &virtualedit = virtualedit