From: Christian Heller Date: Fri, 8 Mar 2019 10:39:09 +0000 (+0100) Subject: Further fix char deletion in-line rules. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/process?a=commitdiff_plain;h=777906ce4ee4f4f1d82addd1ee3d53fe894ddf0c;p=plomvi.el Further fix char deletion in-line rules. --- 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)