diff --git a/runtime/syntax/hitest.vim b/runtime/syntax/hitest.vim
index 1e39451dc..bb6eb71f0 100644
--- a/runtime/syntax/hitest.vim
+++ b/runtime/syntax/hitest.vim
@@ -13,16 +13,18 @@ let s:lazyredraw  = &lazyredraw
 let s:more	  = &more
 let s:report      = &report
 let s:shortmess   = &shortmess
+let s:whichwrap   = &whichwrap
 let s:wrapscan    = &wrapscan
 let s:register_a  = @a
 let s:register_se = @/
 
 " set global options
 set hidden lazyredraw nomore report=99999 shortmess=aoOstTW wrapscan
+set whichwrap&
 
 " print current highlight settings into register a
 redir @a
-highlight
+silent highlight
 redir END
 
 " Open a new window if the current one isn't empty
@@ -47,12 +49,15 @@ g/xxx /s///e
 " remove color settings (not needed here)
 global! /links to/ substitute /\s.*$//e
 
+" Move split 'links to' lines to the same line
+% substitute /^\(\w\+\)\n\s*\(links to.*\)/\1\t\2/e
+
 " move linked groups to the end of file
 global /links to/ move $
 
 " move linked group names to the matching preferred groups
 % substitute /^\(\w\+\)\s*\(links to\)\s*\(\w\+\)$/\3\t\2 \1/e
-global /links to/ normal mz3ElD0#$p'zdd
+silent! global /links to/ normal mz3ElD0#$p'zdd
 
 " delete empty lines
 global /^ *$/ delete
@@ -68,6 +73,9 @@ syntax clear
 " remove syntax commands again
 % substitute /^syn keyword //
 
+" remove cleared names at the end
+g/ cleared$/d
+
 " pretty formatting
 global /^/ exe "normal Wi\<CR>\t\eAA\ex"
 global /^\S/ join
@@ -124,6 +132,7 @@ let &lazyredraw  = s:lazyredraw
 let &more	 = s:more
 let &report	 = s:report
 let &shortmess	 = s:shortmess
+let &whichwrap   = s:whichwrap
 let &wrapscan	 = s:wrapscan
 let @a		 = s:register_a
 
@@ -133,6 +142,6 @@ let @/ = s:register_se
 
 " remove variables
 unlet s:hidden s:lazyredraw s:more s:report s:shortmess
-unlet s:wrapscan s:register_a s:register_se
+unlet s:whichwrap s:wrapscan s:register_a s:register_se
 
 " vim: ts=8
