Save/restore view of saved window instead of cursor position.

This commit is contained in:
Markus Braun
2008-01-23 09:49:33 +00:00
parent bfdc09a732
commit fceb8855f9

View File

@@ -293,9 +293,9 @@ endf
" encrypts the buffer to all previous recipients " encrypts the buffer to all previous recipients
" "
fun s:GPGEncrypt() fun s:GPGEncrypt()
" save cursor position " save window view
let s:GPGCursorPosition = getpos(".") let s:GPGWindowView = winsaveview()
call s:GPGDebug(2, "saved cursor position " . string(s:GPGCursorPosition)) call s:GPGDebug(2, "saved window view " . string(s:GPGWindowView))
" store encoding and switch to a safe one " store encoding and switch to a safe one
if &fileencoding != &encoding if &fileencoding != &encoding
@@ -412,9 +412,9 @@ fun s:GPGEncryptPost()
call s:GPGDebug(2, "restored encoding \"" . &encoding . "\"") call s:GPGDebug(2, "restored encoding \"" . &encoding . "\"")
endi endi
" restore cursor position " restore window view
call setpos('.', s:GPGCursorPosition) call winrestview(s:GPGWindowView)
call s:GPGDebug(2, "restored cursor position " . string(s:GPGCursorPosition)) call s:GPGDebug(2, "restored window view" . string(s:GPGWindowView))
" refresh screen " refresh screen
redraw! redraw!