From 6abcb891ea06b2dbb31691d6c8e7a534cf1e2607 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 4 Nov 2021 07:31:43 +0300 Subject: [PATCH] rc man: Gracefully fail link search --- rc/tools/man.kak | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rc/tools/man.kak b/rc/tools/man.kak index 2c32b553..facfaedf 100644 --- a/rc/tools/man.kak +++ b/rc/tools/man.kak @@ -108,8 +108,12 @@ declare-option -hidden regex man_link2 \ # Define a useful command sequence for searching a given regex # and a given sequence of search keys. define-command man-search -params 2 %{ - set-register / %arg[1] - execute-keys %arg[2] + set-register / %arg[1] + try %{ + execute-keys %arg[2] + } catch %{ + fail "Could not find man page link" + } } define-command -docstring 'Go to next man page link' \