mirror of https://github.com/djcb/mu.git
Fix kill ring clobbering by get mail filter
The kill ring fills up with lines like: C: 0/1 B: 28/29 M: +0/0 *0/0 #0/0 S: +2/2 *1/1 #0/0 when using mbsync or another tool using carriage return for progress.
This commit is contained in:
parent
80ecf80a12
commit
9e6bfb9075
|
@ -930,9 +930,13 @@ Also scrolls to the final line, and update the progress throbber."
|
|||
(with-current-buffer (process-buffer proc)
|
||||
(goto-char (point-max))
|
||||
(if (string-match ".*\r\\(.*\\)" msg)
|
||||
(progn
|
||||
(kill-line 0)
|
||||
(insert (match-string 1 msg)))
|
||||
(progn
|
||||
;; kill even with \r
|
||||
(end-of-line)
|
||||
(let ((end (point)))
|
||||
(beginning-of-line)
|
||||
(delete-region (point) end))
|
||||
(insert (match-string 1 msg)))
|
||||
(insert msg)))
|
||||
;; Auto-scroll unless user is interacting with the window.
|
||||
(when (and (window-live-p procwin)
|
||||
|
|
Loading…
Reference in New Issue