* lisp/ibuffer.el (name): When buffer names contain newlines,
quote those newlines before displaying (bug#12378).
(cond ((zerop bufs) "No buffers")
((= 1 bufs) "1 buffer")
(t (format "%s buffers" bufs))))))
- (propertize (buffer-name) 'font-lock-face (ibuffer-buffer-name-face buffer mark)))
+ (let ((string (propertize (buffer-name)
+ 'font-lock-face
+ (ibuffer-buffer-name-face buffer mark))))
+ (if (not (seq-position string ?\n))
+ string
+ (replace-regexp-in-string
+ "\n" (propertize "^J" 'font-lock-face 'escape-glyph) string))))
(define-ibuffer-column size
(:inline t