diff options
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 1288a4591f5..eb33ab87137 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -779,7 +779,7 @@ See also `multi-occur'." | |||
| 779 | curstring | 779 | curstring |
| 780 | "\n")) | 780 | "\n")) |
| 781 | (data | 781 | (data |
| 782 | (if (= nlines 1) | 782 | (if (= nlines 0) |
| 783 | ;; The simple display style | 783 | ;; The simple display style |
| 784 | out-line | 784 | out-line |
| 785 | ;; The complex multi-line display | 785 | ;; The complex multi-line display |
| @@ -787,14 +787,14 @@ See also `multi-occur'." | |||
| 787 | ;; concatenate them all together. | 787 | ;; concatenate them all together. |
| 788 | (apply #'concat | 788 | (apply #'concat |
| 789 | (nconc | 789 | (nconc |
| 790 | (add-prefix (nreverse (cdr (occur-accumulate-lines (- nlines) t)))) | 790 | (add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) t)))) |
| 791 | (list out-line) | 791 | (list out-line) |
| 792 | (add-prefix (cdr (occur-accumulate-lines nlines t)))))))) | 792 | (add-prefix (cdr (occur-accumulate-lines (1+ nlines) t)))))))) |
| 793 | ;; Actually insert the match display data | 793 | ;; Actually insert the match display data |
| 794 | (with-current-buffer out-buf | 794 | (with-current-buffer out-buf |
| 795 | (let ((beg (point)) | 795 | (let ((beg (point)) |
| 796 | (end (insert-get-point data))) | 796 | (end (insert-get-point data))) |
| 797 | (unless (= nlines 1) | 797 | (unless (= nlines 0) |
| 798 | (insert-get-point "-------\n")) | 798 | (insert-get-point "-------\n")) |
| 799 | (add-text-properties | 799 | (add-text-properties |
| 800 | beg (1- end) | 800 | beg (1- end) |