Use clearer variable names for mark backups

This commit is contained in:
Tom McDonald 2014-04-08 15:20:29 -04:00
parent 771336e5eb
commit 694d00abe9

View File

@ -1,6 +1,6 @@
function! s:exchange(x, y, reverse) function! s:exchange(x, y, reverse)
let a = getpos("'a") let mark_a = getpos("'a")
let b = getpos("'b") let mark_b = getpos("'b")
let reg_z = getreg('z') let reg_z = getreg('z')
let reg_z_mode = getregtype('z') let reg_z_mode = getregtype('z')
let reg_unnamed = getreg('"') let reg_unnamed = getreg('"')
@ -22,8 +22,8 @@ function! s:exchange(x, y, reverse)
call cursor(a:y[2][1], a:y[2][2]) call cursor(a:y[2][1], a:y[2][2])
endif endif
call setpos("'a", a) call setpos("'a", mark_a)
call setpos("'b", b) call setpos("'b", mark_b)
call setreg('z', reg_z, reg_z_mode) call setreg('z', reg_z, reg_z_mode)
call setreg('"', reg_unnamed, reg_unnamed_mode) call setreg('"', reg_unnamed, reg_unnamed_mode)
endfunction endfunction