From 777906ce4ee4f4f1d82addd1ee3d53fe894ddf0c Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 8 Mar 2019 11:39:09 +0100
Subject: [PATCH] Further fix char deletion in-line rules.

---
 plomvi.el | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/plomvi.el b/plomvi.el
index 8dd5117..70903b3 100644
--- a/plomvi.el
+++ b/plomvi.el
@@ -163,9 +163,10 @@ Note that this ignores killed rectangles."
     (kill-rectangle (region-beginning) (region-end)))
    ((use-region-p)
     (kill-region (region-beginning) (region-end)))
+   ((not (= (point) (line-end-position)))
+    (delete-char 1))
    ((not (= (line-beginning-position) (line-end-position)))
-    (delete-char 1)
-    (if (not (= (point) (line-beginning-position))) (backward-char)))))
+    (backward-char) (delete-char 1))))
 
 (defun plomvi-rectangle-mark()
   "Start marked rectangle, move right one char so a single column is visible."
@@ -220,12 +221,6 @@ Note that this ignores killed rectangles."
   (interactive)
   (plomvi-mode -1))
 
-(defun plomvi-end-of-line()
-  "Move to end of line exclusive line break char."
-  (interactive)
-  (end-of-line)
-  (if (not (= (point) (line-beginning-position))) (backward-char)))
-
 (defvar plomvi-mode-basic-map (make-sparse-keymap)
   "Keymap for `plomvi-mode' on read-only buffers.
 
@@ -250,7 +245,7 @@ become available to be used for other purposes.")
 (define-key plomvi-mode-basic-map (kbd "g") 'plomvi-g-map)
 (define-key plomvi-g-map (kbd "g") 'beginning-of-buffer)
 (define-key plomvi-mode-basic-map (kbd "G") 'plomvi-goto-line)
-(define-key plomvi-mode-basic-map (kbd "$") 'plomvi-end-of-line)
+(define-key plomvi-mode-basic-map (kbd "$") 'end-of-line)
 (define-key plomvi-mode-basic-map (kbd "0") 'plomvi-prefix-zero-or-line-start)
 (define-key plomvi-mode-basic-map (kbd "1") 'digit-argument)
 (define-key plomvi-mode-basic-map (kbd "2") 'digit-argument)
-- 
2.30.2