patch 9.0.1802: Multiline regex with Visual selection fails with virtual text

Problem:  Multiline regex with Visual selection fails when Visual
          selection contains virtual text after last char.
Solution: Only include virtual text after last char when getting full
          line length.

closes: #12908

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index f258c19..209b804 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -3235,6 +3235,14 @@
   call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_4', {})
   call term_sendkeys(buf, "j")
   call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_5', {})
+  call term_sendkeys(buf, "0\<C-V>2l2k")
+  call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_6', {})
+  call term_sendkeys(buf, "\<Esc>/aaa\\n\\%V\<CR>")
+  call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_7', {})
+  call term_sendkeys(buf, "3ggic")
+  call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_8', {})
+  call term_sendkeys(buf, "\<Esc>/aaa\\nc\\%V\<CR>")
+  call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_9', {})
 
   call StopVimInTerminal(buf)
 endfunc