Commit ce4ef587 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(sort-reorder-buffer): Don't assume point-min == 1.

parent c6005bf3
......@@ -186,9 +186,7 @@ same as ENDRECFUN."
sort-lists (cdr sort-lists)
old (cdr old)))
(goto-char (point-max))
(insert-buffer-substring old-buffer
(insert-buffer-substring old-buffer last max)
;; Copy the reordered text from the temporary buffer
;; to the buffer we sorted (OLD-BUFFER).
......@@ -203,7 +201,7 @@ same as ENDRECFUN."
(delete-region min max)
;; Now replace the separator " " with the sorted text.
(goto-char (point-max))
(insert-buffer-substring temp-buffer 1 (1+ (- max min)))
(insert-buffer-substring temp-buffer)
(delete-region min (1+ min))))))
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