From 5ba1b297ba4d62a2c686f6f226b433c699f47cab Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 15 Feb 2019 03:44:47 +0100
Subject: [PATCH] Simplify plomvi-Y code.

---
 plomvi.el | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/plomvi.el b/plomvi.el
index 34524fd..6c9df1d 100644
--- a/plomvi.el
+++ b/plomvi.el
@@ -181,20 +181,14 @@ Note that this ignores killed rectangles."
            (start-end-pos (region-end))
            (region-start (progn
                            (goto-char start-start-pos)
-                           (beginning-of-line)
-                           (point)))
+                           (line-beginning-position)))
            (region-end (progn
                          (goto-char start-end-pos)
-                         (end-of-line)
-                         (+ 1 (point)))))
+                         (+ 1 (line-end-position)))))
       (copy-region-as-kill region-start region-end)
       (goto-char region-start)))
    (t
-    (let ((keep-pos (point))
-          (region-start (progn (beginning-of-line) (point)))
-          (region-end (progn (end-of-line) (+ 1 (point)))))
-      (copy-region-as-kill region-start region-end)
-      (goto-char keep-pos)))))
+    (copy-region-as-kill (line-beginning-position) (+ 1 (line-end-position))))))
 
 (defun plomvi-copy-region()
   "Copy marked region."
-- 
2.30.2