mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
After switching to the sudo-ed tramp buffer, this restores the point and scroll position of the window to match the source buffer. I exploit save-place here instead of simply saving/restoring (point) and (window-start), because I believe it's better UX that save-place treat the two buffers as effectively the same now and in the future, and record the last cursor position equally between them, even if the implementation is messier. This *could* be generalized into an advice for save-place-find-file-hook and save-place-to-alist, but that's an experiment for another day. This is an experimental implementation and may change later. Close: #7181 Co-authored-by: YourFin <YourFin@users.noreply.github.com>