mirror of https://codeberg.org/cage/tinmop/
- prevented a crash if an invalid regular expression is used
when searching in a message window.
This commit is contained in:
parent
63f12331c6
commit
133ac1a48d
|
@ -378,7 +378,13 @@
|
|||
|
||||
(defmethod process-event ((object search-regex-message-content-event))
|
||||
(let ((regexp (payload object)))
|
||||
(message-window:search-regex specials:*message-window* regexp)))
|
||||
(when (text-utils:string-not-empty-p regexp)
|
||||
(handler-case
|
||||
(progn
|
||||
(cl-ppcre:create-scanner regexp)
|
||||
(message-window:search-regex specials:*message-window* regexp))
|
||||
(error ()
|
||||
(ui:error-message (_ "Invalid regular expression")))))))
|
||||
|
||||
(defclass thread-goto-message (program-event) ())
|
||||
|
||||
|
|
Loading…
Reference in New Issue