; Not to be merged to master
* lisp/replace.el (occur-engine): Avoid inserting the current line if
orig-line is nil. This happens, for example, when reverting an occur
buffer with `list-matching-lines-jump-to-current-line' set to t.
(Bug#33476)
(when (and list-matching-lines-jump-to-current-line
(not multi-occur-p)
(not orig-line-shown-p)
+ orig-line
(>= curr-line orig-line))
(insert
(concat
;; Insert original line if haven't done yet.
(when (and list-matching-lines-jump-to-current-line
(not multi-occur-p)
- (not orig-line-shown-p))
+ (not orig-line-shown-p)
+ orig-line)
(with-current-buffer out-buf
(insert
(concat