patch 9.0.1759: Visual highlight not working with cursor at end of screen line

Problem:  Visual highlight not working with cursor at end of screen line
          and 'showbreak'.
Solution: Only update "vcol_prev" when drawing buffer text.

closes: #12865

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
diff --git a/src/testdir/dumps/Test_visual_hl_with_showbreak.dump b/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
new file mode 100644
index 0000000..fa0b2dc
--- /dev/null
+++ b/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
@@ -0,0 +1,6 @@
+|a+0&#ffffff0@48>a
+|++0#4040ff13&|a+0#0000000#e0e0e08@3|a+0&#ffffff0@5| @38
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@9|5| @8|1|,|5|0| @9|A|l@1| 
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim
index f152e7b..58b7392 100644
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -1554,5 +1554,23 @@
   set updatecount&
 endfunc
 
+" Test Visual highlight with cursor at end of screen line and 'showbreak'
+func Test_visual_hl_with_showbreak()
+  CheckScreendump
+
+  let lines =<< trim END
+    setlocal showbreak=+
+    call setline(1, repeat('a', &columns + 10))
+    normal g$v4lo
+  END
+  call writefile(lines, 'XTest_visual_sbr', 'D')
+
+  let buf = RunVimInTerminal('-S XTest_visual_sbr', {'rows': 6, 'cols': 50})
+  call VerifyScreenDump(buf, 'Test_visual_hl_with_showbreak', {})
+
+  " clean up
+  call term_sendkeys(buf, "\<Esc>")
+  call StopVimInTerminal(buf)
+endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab