From b8cf099b4338ee6aba5dee5ca9137502d69cb088 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Tue, 29 Apr 2008 19:08:48 -0500 Subject: handle textobjects starting or ending on a newline --- vimrc | 6 ++++++ 1 file changed, 6 insertions(+) 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' -- cgit v1.2.3