patch 8.2.2911: pattern "\%V" does not match all of block selection

Problem:    Pattern "\%V" does not match all of block selection. (Rick Howe)
Solution:   Use the value of vi_curswant. (closes #8285)
diff --git a/src/testdir/dumps/Test_hlsearch_block_visual_match.dump b/src/testdir/dumps/Test_hlsearch_block_visual_match.dump
new file mode 100644
index 0000000..0b45678
--- /dev/null
+++ b/src/testdir/dumps/Test_hlsearch_block_visual_match.dump
@@ -0,0 +1,9 @@
+|a+0&#ffff4012@1| | +0&#ffffff0@56
+>b+0&#ffff4012@3| | +0&#ffffff0@54
+|c+0&#ffff4012@5| | +0&#ffffff0@52
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|~| @58
+|~| @58
+|/+0#0000000&|\|%|V| @37|2|,|1| @10|A|l@1| 
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index b265e97..49e86f8 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -984,6 +984,26 @@
   call delete('Xhlvisual_script')
 endfunc
 
+func Test_hlsearch_block_visual_match()
+  CheckScreendump
+
+  let lines =<< trim END
+    set hlsearch
+    call setline(1, ['aa', 'bbbb', 'cccccc'])
+  END
+  call writefile(lines, 'Xhlsearch_block')
+  let buf = RunVimInTerminal('-S Xhlsearch_block', {'rows': 9, 'cols': 60})
+
+  call term_sendkeys(buf, "G\<C-V>$kk\<Esc>")
+  sleep 100m
+  call term_sendkeys(buf, "/\\%V\<CR>")
+  sleep 100m
+  call VerifyScreenDump(buf, 'Test_hlsearch_block_visual_match', {})
+
+  call StopVimInTerminal(buf)
+  call delete('Xhlsearch_block')
+endfunc
+
 func Test_incsearch_substitute()
   CheckOption incsearch