[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode
From: |
Eli Zaretskii |
Subject: |
bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines |
Date: |
Sun, 27 Oct 2019 17:09:15 +0200 |
> From: Michał Krzywkowski <mkrzywkow@gmail.com>
> Date: Sun, 27 Oct 2019 11:02:39 +0100
>
> When I revert a regular tabulated-list-mode buffer, the point stays the
> same, and the displayed buffer boundaries remain the same as well.
>
> However, when the entries in tabulated-list-entries contain strings that
> are too long and will be truncated, reverting such buffer will scroll
> the screen by one line.
>
> To see this behavior, evaluate in emacs -Q, then type g:
>
> (with-current-buffer (generate-new-buffer "test")
> (require 'cl-lib)
> (tabulated-list-mode)
> (setq tabulated-list-format [("No." 5) ("Message" 10)])
> (let ((message (make-string 100 ?a)))
> (setq tabulated-list-entries
> (cl-loop for i from 1 to 100
> collect `(,i [,(number-to-string i) ,message]))))
> (tabulated-list-init-header)
> (revert-buffer)
> (forward-line 50)
> (pop-to-buffer (current-buffer))
> (recenter))
>
> You can also see that if the lines are not truncated, the behavior is
> correct.
Thanks, should be fixed now. Please test.