Avoid confusing message in Ibuffer (bug#64230)
* lisp/ibuffer.el (ibuffer-map-lines): With `ibuffer-auto-mode' enabled, Ibuffer counts the automatically popped up (and hence not user-marked) buffer "*Ibuffer confirmation*". Since Ibuffer reports how many user-marked buffers were acted upon, and in this case the reported count would be too high by one, decrement the count to avoid the confusing message.
This commit is contained in:
parent
7a3e992ba5
commit
ca95e45f7e
1 changed files with 12 additions and 2 deletions
|
@ -1872,7 +1872,8 @@ the buffer object itself and the current mark symbol."
|
|||
(let ((result
|
||||
(if (buffer-live-p (ibuffer-current-buffer))
|
||||
(when (or (null group)
|
||||
(when-let ((it (get-text-property (point) 'ibuffer-filter-group)))
|
||||
(when-let ((it (get-text-property
|
||||
(point) 'ibuffer-filter-group)))
|
||||
(equal group it)))
|
||||
(save-excursion
|
||||
(funcall function
|
||||
|
@ -1897,7 +1898,16 @@ the buffer object itself and the current mark symbol."
|
|||
(t
|
||||
(cl-incf ibuffer-map-lines-count)
|
||||
(forward-line 1)))))
|
||||
ibuffer-map-lines-count)
|
||||
;; With `ibuffer-auto-mode' enabled, the preceding loop
|
||||
;; counts the automatically popped up (and hence not
|
||||
;; user-marked) buffer "*Ibuffer confirmation*". Since
|
||||
;; Ibuffer reports how many user-marked buffers were acted
|
||||
;; upon, and in this case the reported count would be too
|
||||
;; high by one, we decrement the count to avoid the
|
||||
;; confusing message (see bug#64230).
|
||||
(if (and (featurep 'ibuf-ext) ibuffer-auto-mode)
|
||||
(1- ibuffer-map-lines-count)
|
||||
ibuffer-map-lines-count))
|
||||
(progn
|
||||
(setq buffer-read-only t)
|
||||
(unless nomodify
|
||||
|
|
Loading…
Add table
Reference in a new issue