Commit 12f71167 authored by Tino Calancha's avatar Tino Calancha
Browse files

Ibuffer: Detect correctly the buffers running a process

* lisp/ibuffer.el (filename-and-process): Store the process buffer
as a text property; check for such property to detect a buffer
with a process (Bug#32420).
parent 18422976
......@@ -1912,11 +1912,9 @@ If point is on a group name, this function operates on that group."
(let ((procs 0)
(files 0))
(dolist (string strings)
(if (string-match "\\(?:\\`([[:ascii:]]+)\\)" string)
(progn (setq procs (1+ procs))
(if (< (match-end 0) (length string))
(setq files (1+ files))))
(setq files (1+ files))))
(when (get-text-property 1 'ibuffer-process string)
(setq procs (1+ procs)))
(setq files (1+ files)))
(concat (cond ((zerop files) "No files")
((= 1 files) "1 file")
(t (format "%d files" files)))
......@@ -1928,7 +1926,8 @@ If point is on a group name, this function operates on that group."
(filename (ibuffer-make-column-filename buffer mark)))
(if proc
(concat (propertize (format "(%s %s)" proc (process-status proc))
'font-lock-face 'italic)
'font-lock-face 'italic
'ibuffer-process proc)
(if (> (length filename) 0)
(format " %s" filename)
""))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment