aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-04-29 19:08:48 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-04-29 19:08:48 -0500
commitb8cf099b4338ee6aba5dee5ca9137502d69cb088 (patch)
treed1186004b784a959f9558a47ac4221d259e70734
parent8ef822cfc8114cfcdf68318b13d6b42b3a7e1d09 (diff)
downloadvim-textobj-b8cf099b4338ee6aba5dee5ca9137502d69cb088.tar.gz
vim-textobj-b8cf099b4338ee6aba5dee5ca9137502d69cb088.zip
handle textobjects starting or ending on a newline
-rw-r--r--vimrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index b11c3d8..b0fd941 100644
--- a/vimrc
+++ b/vimrc
@@ -304,7 +304,13 @@ function Textobj(char, callback)
endfor
let objlength -= 1
endif
+ if endcol == 0
+ normal! J
+ endif
call cursor(startline, startcol)
+ if startcol > strlen(getline(startline))
+ normal! J
+ endif
exe 'normal! '.a:operator.objlength.' '
if a:operator == 'c'