Skip to content

Commit

Permalink
Merge pull request #1660 from sakurawald/fix-vi-isearch-regex
Browse files Browse the repository at this point in the history
fix: ignore errors during the process of creating regex scanner for vi-search-{forward/backward}
  • Loading branch information
cxxxr authored Dec 1, 2024
2 parents d7b30fb + 5b061ff commit 224164b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions extensions/vi-mode/commands.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ Move the cursor to the first non-blank character of the line."

(define-command vi-swapcase-and-forward-char () ()
(with-point ((start (current-point))
(end (current-point)))
(end (current-point)))
(character-offset end 1)
(vi-swapcase start end (current-state)))
(vi-forward-char))
Expand Down Expand Up @@ -788,18 +788,18 @@ on the same line or at eol if there are none."
(lambda (point string)
(alexandria:when-let (p (lem/isearch::search-forward-regexp
(copy-point lem/isearch::*isearch-start-point* :temporary)
(ppcre:create-scanner string :case-insensitive-mode case-insensitive)))
(ignore-errors (ppcre:create-scanner string :case-insensitive-mode case-insensitive))))
(character-offset p (- (length string)))
(move-point point p)))
(lambda (point regex &optional limit-point)
(lem/isearch::search-forward-regexp
point
(ppcre:create-scanner regex :case-insensitive-mode case-insensitive)
limit-point))
point
(ignore-errors (ppcre:create-scanner regex :case-insensitive-mode case-insensitive))
limit-point))
(lambda (point regex &optional limit-point)
(lem/isearch::search-backward-regexp
point
(ppcre:create-scanner regex :case-insensitive-mode case-insensitive)
(ignore-errors (ppcre:create-scanner regex :case-insensitive-mode case-insensitive))
limit-point))
""))))

Expand Down

0 comments on commit 224164b

Please sign in to comment.