patch 8.2.1844: using "q" at the more prompt doesn't stop a long message

Problem:    Using "q" at the more prompt doesn't stop a long message.
Solution:   Check for "got_int". (closes #7122)
diff --git a/src/testdir/dumps/Test_quit_long_message.dump b/src/testdir/dumps/Test_quit_long_message.dump
new file mode 100644
index 0000000..9624747
--- /dev/null
+++ b/src/testdir/dumps/Test_quit_long_message.dump
@@ -0,0 +1,6 @@
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|0|,|0|-|1| @8|A|l@1| 
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index c575672..158e94b 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -4,6 +4,7 @@
 source shared.vim
 source term_util.vim
 source view_util.vim
+source screendump.vim
 
 func Test_messages()
   let oldmore = &more
@@ -309,4 +310,20 @@
   nunmap <C-B>
 endfunc
 
+func Test_quit_long_message()
+  CheckScreendump
+
+  let content =<< trim END
+    echom range(9999)->join("\x01")
+  END
+  call writefile(content, 'Xtest_quit_message')
+  let buf = RunVimInTerminal('-S Xtest_quit_message', #{rows: 6})
+  call term_sendkeys(buf, "q")
+  call VerifyScreenDump(buf, 'Test_quit_long_message', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete('Xtest_diff_rnu')
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab