From 6fde982d731e2cc4e5f6bded6f8955ab2daee3b7 Mon Sep 17 00:00:00 2001 From: denin Date: Sun, 5 Feb 2017 18:45:20 +0300 Subject: [PATCH] fix for append from visual state --- evil-commands.el | 1 + evil-tests.el | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/evil-commands.el b/evil-commands.el index 6ae1a45b..d11875b0 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -2301,6 +2301,7 @@ the lines." (evil-insert count vcount skip-empty-lines))) (t (evil-visual-rotate 'lower-right) + (backward-char) (evil-append count))) (unless (eolp) (forward-char)) (evil-insert count vcount skip-empty-lines) diff --git a/evil-tests.el b/evil-tests.el index 41031cb5..ea970d66 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -596,6 +596,14 @@ Below some empty line" ("aevil rulz " [escape]) ";; Tevil rulz[ ]his buffer is for notes you don't want to save")) +(ert-deftest evil-test-visual-append () + "Test `evil-append' from visual state" + :tags '(evil insert) + (evil-test-buffer + ";; [T]his buffer is for notes you don't want to save" + ("veA_evil rulz " [escape]) + ";; This_evil rulz[ ] buffer is for notes you don't want to save")) + (ert-deftest evil-test-open-above () "Test `evil-open-above'" :tags '(evil insert)