summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/rect.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/rect.el b/lisp/rect.el
index 13499d686f..f9bebc47fe 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -108,7 +108,7 @@ Point is at the end of the segment of this line within the rectangle."
(defun rectangle--col-pos (col kind)
(let ((c (move-to-column col)))
- (if (= c col)
+ (if (and (= c col) (not (eolp)))
(if (eq kind 'point)
(if (window-parameter nil 'rectangle--point-crutches)
(setf (window-parameter nil 'rectangle--point-crutches) nil))