patch 8.2.3698: match highlighting continues over breakindent

Problem:    Match highlighting continues over breakindent.
Solution:   Stop before the end column. (closes #9242)
diff --git a/src/testdir/test_match.vim b/src/testdir/test_match.vim
index 869ad6c..6ca163b 100644
--- a/src/testdir/test_match.vim
+++ b/src/testdir/test_match.vim
@@ -349,6 +349,23 @@
   call delete('XscriptMatchCommon')
 endfunc
 
+func Test_match_in_linebreak()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+    set breakindent linebreak breakat+=]
+    call printf('%s]%s', repeat('x', 50), repeat('x', 70))->setline(1)
+    call matchaddpos('ErrorMsg', [[1, 51]])
+  END
+  call writefile(lines, 'XscriptMatchLinebreak')
+  let buf = RunVimInTerminal('-S XscriptMatchLinebreak', #{rows: 10})
+  call TermWait(buf)
+  call VerifyScreenDump(buf, 'Test_match_linebreak', {})
+
+  call StopVimInTerminal(buf)
+  call delete('XscriptMatchLinebreak')
+endfunc
+
 " Test for deleting matches outside of the screen redraw top/bottom lines
 " This should cause a redraw of those lines.
 func Test_matchdelete_redraw()