branch: elpa/evil-numbers
commit 83e98f9fe229efe2fd414270e84916bbea2aa8b5
Author: Campbell Barton <[email protected]>
Commit: Campbell Barton <[email protected]>
Correct invalid limit argument to `looking-back'
This argument is an absolute position,
not relative to the point.
Also apply limit to skip-chars-forward.
---
evil-numbers.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/evil-numbers.el b/evil-numbers.el
index ab7b7c9e40..97dd9d3399 100644
--- a/evil-numbers.el
+++ b/evil-numbers.el
@@ -348,10 +348,10 @@ note that searching still starts at POINT."
(or
(not (memq (char-after) '(?b ?B ?o ?O ?x ?X)))
(/= (char-before) ?0)
- (and (> (point) 2) ;; Should also take bofp into consideration.
- (not (looking-back "\\W0" 2)))
+ ;; Should also take bofp into consideration.
+ (not (looking-back "\\W0" (max beg (- (point) 2))))
;; Skip format specifiers and interpret as boolean.
- (<= 0 (skip-chars-forward "bBoOxX"))))))
+ (<= 0 (skip-chars-forward "bBoOxX" end))))))
(defun evil-numbers--match-from-skip-chars (skip-chars dir do-check do-match)
"Match SKIP-CHARS in DIR (-1 or 1).