Skip to content

Commit d8d85bf

Browse files
committed
patch 8.0.1049: shell on Mac can't handle long text
Problem: Shell on Mac can't handle long text, making terminal test fail. Solution: Only write 1000 characters instead of 5000.
1 parent 5e80de3 commit d8d85bf

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/testdir/test_terminal.vim

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,14 +458,16 @@ endfunction
458458

459459
func Test_terminal_noblock()
460460
let g:buf = term_start(&shell)
461+
if has('mac')
462+
" The shell or something else has a problem dealing with more than 1000
463+
" characters at the same time.
464+
let len = 1000
465+
else
466+
let len = 5000
467+
endif
461468

462469
for c in ['a','b','c','d','e','f','g','h','i','j','k']
463-
call term_sendkeys(g:buf, 'echo ' . repeat(c, 5000) . "\<cr>")
464-
if has('mac')
465-
" TODO: this should not be needed, but without it sending keys blocks
466-
" after 8000 chars or so.
467-
sleep 100m
468-
endif
470+
call term_sendkeys(g:buf, 'echo ' . repeat(c, len) . "\<cr>")
469471
endfor
470472
call term_sendkeys(g:buf, "echo done\<cr>")
471473

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
1049,
772774
/**/
773775
1048,
774776
/**/

0 commit comments

Comments
 (0)