1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-19 20:30:29 -08:00
Commit graph

3 commits

Author SHA1 Message Date
Laurence Warne
f0ac01812f Preserve the window position with proced (bug#60381)
Preserve the window position for windows which display a proced
buffer, but are not the selected window when a proced buffer is
updated.  Previously, the window position would be set to the
start of the buffer when a proced buffer was updated and it was
not displayed in the selected window.

Similarly, preserve the position in proced buffers which are not
displayed in any window by setting
'switch-to-buffer-preserve-window-point' to nil in proced buffers.

* lisp/proced.el (proced-auto-update-timer): Only update a given
proced buffer if it is displayed in a window.
(proced-update): Set the window position if the proced buffer is
displayed in a window.
(proced--position-info, proced--determine-pos): New Functions.
(proced-mode): Set 'switch-to-buffer-preserve-window-point' to
nil in proced buffers.
* test/lisp/proced-tests.el
(proced-update-preserves-pid-at-point-test): New test.
2023-01-14 10:36:15 +02:00
Eli Zaretskii
3b573f7d1f Make proced-tests work on more systems
* test/lisp/proced-tests.el (proced-format-test)
(proced-update-test, proced-revert-test, proced-color-test):
Remove the 'skip-unless' condition, as it is unnecessary.
(proced-refine-test, proced-refine-with-update-test): Use PID, not
Args, as the column to test, as PID is more portable.
2022-12-14 16:53:29 +02:00
Laurence Warne
e22a71443a Add tests for proced
* test/lisp/proced-tests.el: New file.
2022-12-14 16:34:39 +02:00