diff --git a/lisp/rect.el b/lisp/rect.el index 5ff821abb3f..cdfd0764b99 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -940,7 +940,8 @@ Ignores `line-move-visual'." (move-to-column endcol t) (dotimes (_ n) (insert (cadr lines))))) - (region-beginning) (region-end)) + (min (point) (mark)) + (max (point) (mark))) ;; Recompute the rectangle state; no crutches should be needed now. (let ((p (point)) (m (mark)))