patch 9.0.0592: display not cleared when scrolling back in messages

Problem:    Display not cleared when scrolling back in messages, a background
            color is set and t_ut is empty.
Solution:   Clear to the end of the display if needed. (closes #8973)
diff --git a/src/testdir/dumps/Test_more_scrollback_1.dump b/src/testdir/dumps/Test_more_scrollback_1.dump
new file mode 100644
index 0000000..619f5a7
--- /dev/null
+++ b/src/testdir/dumps/Test_more_scrollback_1.dump
@@ -0,0 +1,10 @@
+|0+0#ffffff16#0000001| @73
+|1| @73
+|2| @73
+|3| @73
+|4| @73
+|5| @73
+|6| @73
+|7| @73
+|8| @73
+|-+0#00e0003&@1| |M|o|r|e| |-@1> +0#ffffff16&@64
diff --git a/src/testdir/dumps/Test_more_scrollback_2.dump b/src/testdir/dumps/Test_more_scrollback_2.dump
new file mode 100644
index 0000000..619f5a7
--- /dev/null
+++ b/src/testdir/dumps/Test_more_scrollback_2.dump
@@ -0,0 +1,10 @@
+|0+0#ffffff16#0000001| @73
+|1| @73
+|2| @73
+|3| @73
+|4| @73
+|5| @73
+|6| @73
+|7| @73
+|8| @73
+|-+0#00e0003&@1| |M|o|r|e| |-@1> +0#ffffff16&@64
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index a32ff51..c69d0a9 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -311,6 +311,32 @@
   call StopVimInTerminal(buf)
 endfunc
 
+" Test more-prompt scrollback
+func Test_message_more_scrollback()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+      set t_ut=
+      hi Normal ctermfg=15 ctermbg=0
+      for i in range(100)
+          echo i
+      endfor
+  END
+  call writefile(lines, 'XmoreScrollback', 'D')
+  let buf = RunVimInTerminal('-S XmoreScrollback', {'rows': 10})
+  call VerifyScreenDump(buf, 'Test_more_scrollback_1', {})
+
+  call term_sendkeys(buf, 'f')
+  call TermWait(buf)
+  call term_sendkeys(buf, 'b')
+  call VerifyScreenDump(buf, 'Test_more_scrollback_2', {})
+
+  call term_sendkeys(buf, 'q')
+  call TermWait(buf)
+  call StopVimInTerminal(buf)
+endfunc
+
+
 func Test_ask_yesno()
   CheckRunVimInTerminal
   let buf = RunVimInTerminal('', {'rows': 6})