patch 8.1.2419: with a long file name the hit-enter prompt appears

Problem:    With a long file name the hit-enter prompt appears. (J. Lewis
            Muir)
Solution:   When checking for text to wrap don't do this when outputing a CR.
diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim
index a25d2cf..4ef361e 100644
--- a/src/testdir/test_display.vim
+++ b/src/testdir/test_display.vim
@@ -181,3 +181,21 @@
   call StopVimInTerminal(buf)
   call delete(filename)
 endfunc
+
+" check a long file name does not result in the hit-enter prompt
+func Test_edit_long_file_name()
+  CheckScreendump
+
+  let longName = 'x'->repeat(&columns)
+  call writefile([], longName)
+  let buf = RunVimInTerminal('-N -u NONE ' .. longName, #{rows: 8})
+
+  call VerifyScreenDump(buf, 'Test_long_file_name_1', {})
+
+  call term_sendkeys(buf, ":q\<cr>")
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete(longName)
+endfunc
+