patch 9.0.1749: Text property highlight doesn't override a sign highlight on TAB

Problem: Text property highlight doesn't override a sign highlight over
         a tab character
Solution: Let text_property override tab highlighting

This fixes a few problems of text properties:

-  text property highlighting when override=true does not overwrite TAB
   highlighting
-  text property highlighting when override=true does not overwrite TAB
   highlighting with :set list
-  text property highlighting is used instead of sign highlight after
   the actual text ends when signs are present with linehl is set

closes: #21584
closes: #21592

Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index da8c495..9b03d10 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -3999,4 +3999,30 @@
 
   call StopVimInTerminal(buf)
 endfunc
+
+func Test_text_prop_list_hl_and_sign_highlight()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+    func Test()
+        split Xbuffer
+        call setline(1, ['one', "\ttab", '        space', 'three', 'four', 'five'])
+        call prop_type_add('Prop1', #{highlight: 'Search', override: v:true})
+        sign define sign1 text=>> linehl=DiffAdd
+        sign place 10 line=2 name=sign1
+        sign place 20 line=3 name=sign1
+        call prop_add(1, 1, #{end_lnum: 4, end_col: 5, type: 'Prop1'})
+        sign place 30 line=5 name=sign1
+    endfunc
+    call Test()
+  END
+  call writefile(lines, 'XtextPropSignTab', 'D')
+  let buf = RunVimInTerminal('-S XtextPropSignTab', #{rows: 8, cols: 60})
+  call VerifyScreenDump(buf, 'Test_prop_sign_tab_1', {})
+
+  call term_sendkeys(buf, ":setl list listchars=eol:¶,tab:>-\<CR>")
+  call VerifyScreenDump(buf, 'Test_prop_sign_tab_2', {})
+
+  call StopVimInTerminal(buf)
+endfunc
 " vim: shiftwidth=2 sts=2 expandtab