Fix another case for cursor adjustment

This commit is contained in:
Tom McDonald 2016-06-18 09:44:35 -07:00
parent 7d14f43244
commit d069729b1a

View File

@ -59,7 +59,7 @@ function! s:fix_cursor(x, y, reverse)
if a:x.start.line == a:y.start.line if a:x.start.line == a:y.start.line
let horizontal_offset = a:x.end.column - a:y.end.column let horizontal_offset = a:x.end.column - a:y.end.column
call cursor(a:x.start.line, a:x.start.column - horizontal_offset) 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 let vertical_offset = a:x.end.line - a:y.end.line
call cursor(a:x.start.line - vertical_offset, a:x.start.column) call cursor(a:x.start.line - vertical_offset, a:x.start.column)
endif endif