From d069729b1a16ab495a683c784cfc028ec69f1c6a Mon Sep 17 00:00:00 2001 From: Tom McDonald Date: Sat, 18 Jun 2016 09:44:35 -0700 Subject: [PATCH] Fix another case for cursor adjustment --- plugin/exchange.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/exchange.vim b/plugin/exchange.vim index c37341b..bd3656b 100644 --- a/plugin/exchange.vim +++ b/plugin/exchange.vim @@ -59,7 +59,7 @@ function! s:fix_cursor(x, y, reverse) if a:x.start.line == a:y.start.line let horizontal_offset = a:x.end.column - a:y.end.column call cursor(a:x.start.line, a:x.start.column - horizontal_offset) - else + elseif (a:x.end.line - a:x.start.line) != (a:y.end.line - a:y.start.line) let vertical_offset = a:x.end.line - a:y.end.line call cursor(a:x.start.line - vertical_offset, a:x.start.column) endif