File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1686,7 +1686,7 @@ term_get_buf(typval_T *argvars)
16861686 ++ emsg_off ;
16871687 buf = get_buf_tv (& argvars [0 ], FALSE);
16881688 -- emsg_off ;
1689- if (buf -> b_term == NULL )
1689+ if (buf == NULL || buf -> b_term == NULL )
16901690 return NULL ;
16911691 return buf ;
16921692}
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ func Test_terminal_scrape()
5454 call assert_equal (1 , len (termlist))
5555 call assert_equal (buf , termlist[0 ])
5656
57+ " Nothing happens with invalid buffer number
58+ call term_wait (1234 )
59+
5760 call term_wait (buf )
5861 call Check_123 (buf )
5962
@@ -64,4 +67,5 @@ func Test_terminal_scrape()
6467 call Check_123 (buf )
6568
6669 exe buf . ' bwipe'
70+ call delete (' Xtext' )
6771endfunc
Original file line number Diff line number Diff line change @@ -769,6 +769,8 @@ static char *(features[]) =
769769
770770static int included_patches [] =
771771{ /* Add new patch number below this line */
772+ /**/
773+ 816 ,
772774/**/
773775 815 ,
774776/**/
You can’t perform that action at this time.
0 commit comments