mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
vim-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.
0efd1bdcf4
This commit is contained in:

committed by
Jan Edmund Lazo

parent
c4cbf16c91
commit
306d96cd10
@@ -2000,7 +2000,7 @@ static void msg_puts_display(const char_u *str, int maxlen, int attr,
|
||||
|| (*s == TAB && msg_col <= 7)
|
||||
|| (utf_ptr2cells(s) > 1
|
||||
&& msg_col <= 2))
|
||||
: (msg_col + t_col >= Columns - 1
|
||||
: ((*s != '\r' && msg_col + t_col >= Columns - 1)
|
||||
|| (*s == TAB
|
||||
&& msg_col + t_col >= ((Columns - 1) & ~7))
|
||||
|| (utf_ptr2cells(s) > 1
|
||||
|
@@ -185,6 +185,23 @@ func Test_scroll_CursorLineNr_update()
|
||||
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
|
||||
|
||||
" Test for scrolling that modifies buffer during visual block
|
||||
func Test_visual_block_scroll()
|
||||
" See test/functional/legacy/visual_mode_spec.lua
|
||||
|
Reference in New Issue
Block a user