Commits

Anonymous committed b7b3bdd

Go to end of cua-rectangle with C-e if active

Comments (0)

Files changed (1)

files/defuns-edit.el

                      (point))))
             ;; end of rectangle in cua-rect mode
             (eor (when cua--rectangle (my-cua-get-longest-line))))
+        ;; refactor this: make some "move actions" and call them in
+        ;; order until point changes.
         (cond
          ((= (point) eoc)
-          (end-of-line-lov))
+          (if (and cua--rectangle
+                   (/= (1+ (aref cua--rectangle 3)) eor))
+              (cua-resize-rectangle-right (- eor (current-column) 1))
+            (end-of-line-lov)))
          ((= (point) (progn (end-of-line-lov) (point)))
           (if (and cua--rectangle
                    (/= (1+ (aref cua--rectangle 3)) eor))