To: vim_dev@googlegroups.com Subject: Patch 8.1.2419 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2419 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. Files: src/message.c, src/testdir/test_display.vim, src/testdir/dumps/Test_long_file_name_1.dump *** ../vim-8.1.2418/src/message.c 2019-12-06 22:17:37.468828743 +0100 --- src/message.c 2019-12-11 18:55:01.357127405 +0100 *************** *** 2080,2086 **** || (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2)) : #endif ! (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))))) --- 2080,2086 ---- || (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2)) : #endif ! ((*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))))) *** ../vim-8.1.2418/src/testdir/test_display.vim 2019-10-24 15:12:20.295934972 +0200 --- src/testdir/test_display.vim 2019-12-11 18:54:01.585348964 +0100 *************** *** 181,183 **** --- 181,201 ---- 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\") + + " clean up + call StopVimInTerminal(buf) + call delete(longName) + endfunc + *** ../vim-8.1.2418/src/testdir/dumps/Test_long_file_name_1.dump 2019-12-11 18:59:11.380620991 +0100 --- src/testdir/dumps/Test_long_file_name_1.dump 2019-12-11 18:54:10.981312145 +0100 *************** *** 0 **** --- 1,8 ---- + > +0&#ffffff0@74 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |<+0#0000000&|x@64|"| |0|L|,| |0|C| *** ../vim-8.1.2418/src/version.c 2019-12-10 23:43:09.672855573 +0100 --- src/version.c 2019-12-11 18:45:40.247307394 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 2419, /**/ -- hundred-and-one symptoms of being an internet addict: 246. You use up your free 1 Gbyte in two days. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///