From 04ac63ce08e36e45601445a4cfbebc7717ea9199 Mon Sep 17 00:00:00 2001 From: Gong Qijian Date: Sat, 2 Apr 2022 15:32:09 +0800 Subject: [PATCH] evil-ex-make-pattern: Don't transform the word boundaries into vim-style --- evil-search.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evil-search.el b/evil-search.el index e3433818..d87acadb 100644 --- a/evil-search.el +++ b/evil-search.el @@ -434,7 +434,9 @@ expression and is not transformed." (ignore-case (eq (evil-ex-regex-case regexp case) 'insensitive))) ;; possibly transform regular expression from vim-style to ;; Emacs-style. - (if evil-ex-search-vim-style-regexp + (if (and evil-ex-search-vim-style-regexp + (not (or (string-match-p "\\`\\\\_?<" regexp) + (string-match-p "\\\\_?>\\'" regexp)))) (setq re (evil-transform-vim-style-regexp re)) ;; Even for Emacs regular expressions we translate certain ;; whitespace sequences