Use setpos() to set cursor position

This commit is contained in:
Kim Silkebækken 2011-03-28 09:05:10 +02:00
parent 8f19f49f46
commit ed55a301e0

View File

@ -353,13 +353,7 @@
return
else
" Jump to coords
let virtualedit = &virtualedit
setl virtualedit=
silent execute 'normal! ' . coords[0] . 'gg'
silent execute 'normal! "0|"'
silent execute 'normal! ' . (coords[1] - 1) . 'l'
silent execute 'setl virtualedit=' . virtualedit
call setpos('.', [0, coords[0], coords[1]])
call <SID>Message('Jumping to [' . coords[0] . ', ' . coords[1] . ']')
endif