Add switch-to-previous-buffer function