From 5b061ff7fc622932c5243c8b54ced7480101d27f Mon Sep 17 00:00:00 2001 From: sakurawald Date: Sun, 1 Dec 2024 11:34:29 +0800 Subject: [PATCH] fix: ignore errors during the process of creating regex scanner for vi-search-{forward/backward} --- extensions/vi-mode/commands.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/vi-mode/commands.lisp b/extensions/vi-mode/commands.lisp index 64659d58b..3ce475108 100644 --- a/extensions/vi-mode/commands.lisp +++ b/extensions/vi-mode/commands.lisp @@ -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)) @@ -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)) ""))))