branch: elpa/evil
commit a32f016536fadf5080be39f239288b76146216ee
Author: Tom Dalziel <tom...@hotmail.com>
Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>

    Only restore visual if there's something to restore
---
 evil-commands.el | 4 ++--
 evil-tests.el    | 6 ------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/evil-commands.el b/evil-commands.el
index 2221ab4606..1278c612f0 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2591,8 +2591,8 @@ COUNT is infinite."
             (null evil-visual-point)))
        (t
         (setq mark evil-visual-mark
-              point evil-visual-point)))
-      (evil-visual-make-selection mark point type t))))
+              point evil-visual-point)
+        (evil-visual-make-selection mark point type t))))))
 
 (evil-define-motion evil-visual-exchange-corners ()
   "Rearrange corners in Visual Block mode.
diff --git a/evil-tests.el b/evil-tests.el
index 724ea9b96e..8ed12b78a5 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -7551,12 +7551,6 @@ otel")))
 (ert-deftest evil-test-visual-restore ()
   "Test restoring a previous selection"
   :tags '(evil visual)
-  (ert-info ("Start a characterwise selection \
-if no previous selection")
-    (evil-test-buffer
-      ";; [T]his buffer is for notes."
-      ("gv")
-      ";; <[T]>his buffer is for notes."))
   (ert-info ("Restore characterwise selection")
     (evil-test-buffer
       ";; <[T]his> buffer is for notes."

Reply via email to