diff --git a/plugin/interestingwords.vim b/plugin/interestingwords.vim index ec1dc38..c7a32d5 100644 --- a/plugin/interestingwords.vim +++ b/plugin/interestingwords.vim @@ -120,8 +120,14 @@ function! WordNavigation(direction) else normal! N endif - catch /E486/ - echohl WarningMsg | echomsg "E486: Pattern not found: " . @/ + catch /^Vim\%((\a\+)\)\=:\%(E486\|E385\|E384\)/ + if v:exception =~ 'E486' + echohl WarningMsg | echomsg "E486: Pattern not found: " . @/ + elseif v:exception =~ 'E385' + echohl MoreMsg | echomsg "Search hit BOTTOM" + elseif v:exception =~ 'E384' + echohl MoreMsg | echomsg "Search hit TOP" + endif endtry endif endfunction