restore cursor position after copy