From 488ad07cc548469e5356b7cfcca0e3747edff44a Mon Sep 17 00:00:00 2001 From: Samuel Tschiedel Date: Mon, 25 Apr 2022 09:46:36 -0300 Subject: [PATCH] fix(evil): define *-any-quote directly Defining `*-any-quote` objects via the exiting `*-block` helpers leads to incorrect behaviour, where the trailing boundary is also included as part of the selection (cursor on `|`, selection between `|`): ``` start: "te|st" v i q: "|test"| ``` The expected behaviour is the same as `v i "`: ``` start: "te|st" v i q: "|test|" ``` Fix: #5698 --- modules/editor/evil/autoload/textobjects.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/editor/evil/autoload/textobjects.el b/modules/editor/evil/autoload/textobjects.el index 5237c574b..46cc29307 100644 --- a/modules/editor/evil/autoload/textobjects.el +++ b/modules/editor/evil/autoload/textobjects.el @@ -53,7 +53,7 @@ This excludes the protocol and querystring." ("`" . "`") ("‘" . "’") ("“" . "”")))) - (evil-textobj-anyblock-inner-block count beg end type))) + (evil-textobj-anyblock--make-textobj beg end type count nil))) ;;;###autoload (autoload '+evil:outer-any-quote "editor/evil/autoload/textobjects" nil nil) (evil-define-text-object +evil:outer-any-quote (count &optional beg end type) @@ -65,4 +65,4 @@ This excludes the protocol and querystring." ("`" . "`") ("‘" . "’") ("“" . "”")))) - (evil-textobj-anyblock-a-block count beg end type))) + (evil-textobj-anyblock--make-textobj beg end type count t)))