Skip to content

Commit

Permalink
fix: ignore errors during the process of creating regex scanner for v…
Browse files Browse the repository at this point in the history
…i-search-{forward/backward}
  • Loading branch information
sakurawald committed Dec 1, 2024
1 parent 136788a commit 5b061ff
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 5b061ff

Please sign in to comment.