Commit a77540e7 authored by Johan Bockgård's avatar Johan Bockgård

* lisp/rect.el (delete-whitespace-rectangle-line): Don't cross EOL.

parent a3d11ecb
......@@ -346,7 +346,8 @@ no text on the right side of the rectangle."
(defun delete-whitespace-rectangle-line (startcol _endcol fill)
(when (= (move-to-column startcol (if fill t 'coerce)) startcol)
(unless (= (point) (point-at-eol))
(delete-region (point) (progn (skip-syntax-forward " ") (point))))))
(delete-region (point) (progn (skip-syntax-forward " " (point-at-eol))
(point))))))
;;;###autoload
(defalias 'close-rectangle 'delete-whitespace-rectangle) ;; Old name
......
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