diff --git a/rc/tools/man.kak b/rc/tools/man.kak index 41d91104..d75a8188 100644 --- a/rc/tools/man.kak +++ b/rc/tools/man.kak @@ -58,9 +58,9 @@ The page can be a word, or a word directly followed by a section number between ## The completion suggestions display the page number, strip them if present case "${subject}" in *\([1-8]*\)) - pagenum="${subject##*(}" - pagenum="${pagenum%)}" - subject="${subject%%(*}" + pagenum="${subject##*\(}" + pagenum="${pagenum%\)}" + subject="${subject%%\(*}" ;; esac