Timeline for Is there a library to make `'evil-goto-mark` restore the screen position of the marker?
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 20, 2022 at 21:15 | comment | added | Drew | In that case, do what you say in your question's last paragraph. That assumes that your window remains the same height. (There's no function set-window-end.) | |
| Aug 20, 2022 at 18:26 | comment | added | emdash | To explain a bit further: say point is on the last line visible in my window. I save it (say its value is 19900), and then scroll down further into the file. If I call (set-window-point (get-buffer-window) 19900), point will be successfully restored to its previous value, but will now be on the first line visible in my window – I would like it instead to be on the last line, as that's the line it was on before I navigated away. When I jump back with 'evil-goto-mark, I would like the visible screen area to be the same as it was when I called 'evil-set-marker. | |
| Aug 20, 2022 at 18:11 | comment | added | emdash | I don’t believe this answers my question. point is the position of the cursor relative to the start of the file, not relative to the screen. If I run (set-window-start (get-buffer-window) (+ 20 (window-start))), for example, the screen position of the current line changes (it moves up towards the top of the screen), but point remains the same – therefore restoring it is not sufficient. | |
| Aug 20, 2022 at 16:03 | history | answered | Drew | CC BY-SA 4.0 |