File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7861,6 +7861,11 @@ ex_sign(exarg_T *eap)
78617861 { /* ... not currently in a window */
78627862 char_u * cmd ;
78637863
7864+ if (buf -> b_fname == NULL )
7865+ {
7866+ EMSG (_ ("E934: Cannot jump to a buffer that does not have a name" ));
7867+ return ;
7868+ }
78647869 cmd = alloc ((unsigned )STRLEN (buf -> b_fname ) + 25 );
78657870 if (cmd == NULL )
78667871 return ;
Original file line number Diff line number Diff line change @@ -181,3 +181,15 @@ func Test_sign_invalid_commands()
181181 call assert_fails (' sign place 1 buffer=' , ' E158:' )
182182 call assert_fails (' sign define Sign2 text=' , ' E239:' )
183183endfunc
184+
185+ func Test_sign_delete_buffer ()
186+ new
187+ sign define Sign text= x
188+ let bufnr = bufnr (' %' )
189+ new
190+ exe ' bd ' . bufnr
191+ exe ' sign place 61 line=3 name=Sign buffer=' . bufnr
192+ call assert_fails (' sign jump 61 buffer=' . bufnr , ' E934:' )
193+ sign unplace 61
194+ sign undefine Sign
195+ endfunc
Original file line number Diff line number Diff line change @@ -763,6 +763,8 @@ static char *(features[]) =
763763
764764static int included_patches [] =
765765{ /* Add new patch number below this line */
766+ /**/
767+ 2225 ,
766768/**/
767769 2224 ,
768770/**/
You can’t perform that action at this time.
0 commit comments