patch 8.2.2493: text property for text left of window shows up

Problem:    Text property for text left of window shows up.
Solution:   Check if the text property ends before the current column.
            (closes #7806)
diff --git a/src/testdir/dumps/Test_textprop_nowrap_01.dump b/src/testdir/dumps/Test_textprop_nowrap_01.dump
new file mode 100644
index 0000000..f0fe7db
--- /dev/null
+++ b/src/testdir/dumps/Test_textprop_nowrap_01.dump
@@ -0,0 +1,6 @@
+>a+0&#ffffff0|l@1|e|r| |t|h|a|n| |4+0#ffffff16#e000002|5|6|7|.+0#0000000#ffffff0|X@58
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|2|1| @9|A|l@1| 
diff --git a/src/testdir/dumps/Test_textprop_nowrap_02.dump b/src/testdir/dumps/Test_textprop_nowrap_02.dump
new file mode 100644
index 0000000..104c674
--- /dev/null
+++ b/src/testdir/dumps/Test_textprop_nowrap_02.dump
@@ -0,0 +1,6 @@
+|X+0&#ffffff0@36>X| @36
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1@2| @8|A|l@1| 
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 2455335..469d9f7 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -1049,6 +1049,30 @@
   call delete('XtestPropTab')
 endfunc
 
+func Test_textprop_nowrap_scrolled()
+  CheckScreendump
+
+  let lines =<< trim END
+       vim9script
+       set nowrap
+       setline(1, 'The number 123 is smaller than 4567.' .. repeat('X', &columns))
+       prop_type_add('number', {'highlight': 'ErrorMsg'})
+       prop_add(1, 12, {'length': 3, 'type': 'number'})
+       prop_add(1, 32, {'length': 4, 'type': 'number'})
+       feedkeys('gg20zl', 'nxt')
+  END
+  call writefile(lines, 'XtestNowrap')
+  let buf = RunVimInTerminal('-S XtestNowrap', {'rows': 6})
+  call VerifyScreenDump(buf, 'Test_textprop_nowrap_01', {})
+
+  call term_sendkeys(buf, "$")
+  call VerifyScreenDump(buf, 'Test_textprop_nowrap_02', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete('XtestNowrap')
+endfunc
+
 func Test_textprop_with_syntax()
   CheckScreendump