patch 9.0.0133: virtual text after line moves to joined line

Problem:    Virtual text after line moves to joined line. (Yegappan
            Lakshmanan)
Solution:   When joining lines only keep virtual text after the last line.
diff --git a/src/testdir/dumps/Test_prop_with_text_after_joined_1.dump b/src/testdir/dumps/Test_prop_with_text_after_joined_1.dump
new file mode 100644
index 0000000..0a4e73d
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_with_text_after_joined_1.dump
@@ -0,0 +1,6 @@
+|o+0&#ffffff0|n|e| |t|w|o| @52
+|t|h|r|e@1| |f|o|u|r| +0&#ffff4012|F|O|U|R| +0&#ffffff0@44
+|a| |b| |c| |d| |e> |f| +0&#ffff4012|F@2| +0&#ffffff0@44
+|~+0#4040ff13&| @58
+|~| @58
+| +0#0000000&@41|3|,|1|0| @9|A|l@1| 
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 46ee37e..c05a963 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2243,6 +2243,32 @@
   call delete('XscriptPropsWithTextAfter')
 endfunc
 
+func Test_props_with_text_after_joined()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+      call setline(1, ['one', 'two', 'three', 'four'])
+      call prop_type_add('afterprop', #{highlight: 'Search'})
+      call prop_add(1, 0, #{type: 'afterprop', text: ' ONE', text_align: 'after'})
+      call prop_add(4, 0, #{type: 'afterprop', text: ' FOUR', text_align: 'after'})
+      normal ggJ
+      normal GkJ
+
+      call setline(3, ['a', 'b', 'c', 'd', 'e', 'f'])
+      call prop_add(3, 0, #{type: 'afterprop', text: ' AAA', text_align: 'after'})
+      call prop_add(5, 0, #{type: 'afterprop', text: ' CCC', text_align: 'after'})
+      call prop_add(7, 0, #{type: 'afterprop', text: ' EEE', text_align: 'after'})
+      call prop_add(8, 0, #{type: 'afterprop', text: ' FFF', text_align: 'after'})
+      normal 3G6J
+  END
+  call writefile(lines, 'XscriptPropsWithTextAfterJoined')
+  let buf = RunVimInTerminal('-S XscriptPropsWithTextAfterJoined', #{rows: 6, cols: 60})
+  call VerifyScreenDump(buf, 'Test_prop_with_text_after_joined_1', {})
+
+  call StopVimInTerminal(buf)
+  call delete('XscriptPropsWithTextAfterJoined')
+endfunc
+
 func Test_removed_prop_with_text_cleans_up_array()
   new
   call setline(1, 'some text here')