forked from aniani/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.
This commit is contained in:
@@ -2080,7 +2080,7 @@ msg_puts_display(
|
|||||||
|| (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2))
|
|| (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2))
|
||||||
:
|
:
|
||||||
#endif
|
#endif
|
||||||
(msg_col + t_col >= Columns - 1
|
((*s != '\r' && msg_col + t_col >= Columns - 1)
|
||||||
|| (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7))
|
|| (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7))
|
||||||
|| (has_mbyte && (*mb_ptr2cells)(s) > 1
|
|| (has_mbyte && (*mb_ptr2cells)(s) > 1
|
||||||
&& msg_col + t_col >= Columns - 2)))))
|
&& msg_col + t_col >= Columns - 2)))))
|
||||||
|
8
src/testdir/dumps/Test_long_file_name_1.dump
Normal file
8
src/testdir/dumps/Test_long_file_name_1.dump
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
> +0&#ffffff0@74
|
||||||
|
|~+0#4040ff13&| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|<+0#0000000&|x@64|"| |0|L|,| |0|C|
|
@@ -181,3 +181,21 @@ func Test_scroll_CursorLineNr_update()
|
|||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete(filename)
|
call delete(filename)
|
||||||
endfunc
|
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
|
||||||
|
|
||||||
|
@@ -742,6 +742,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2419,
|
||||||
/**/
|
/**/
|
||||||
2418,
|
2418,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user