|| (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2))
:
#endif
- (msg_col + t_col >= Columns - 1
+ ((*s != '\r' && msg_col + t_col >= Columns - 1)
|| (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7))
|| (has_mbyte && (*mb_ptr2cells)(s) > 1
&& msg_col + t_col >= Columns - 2)))))
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
+