Preserve the cursor position when changing the diff context