comparison src/ex_cmds.c @ 9902:5a667a3a3743 v7.4.2225

commit https://github.com/vim/vim/commit/bfd096d02087a10e8e2f4bdfb74e0435506fa8bb Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 17 22:29:09 2016 +0200 patch 7.4.2225 Problem: Crash when placing a sign in a deleted buffer. Solution: Check for missing buffer name. (Dominique Pelle). Add a test.
author Christian Brabandt <cb@256bit.org>
date Wed, 17 Aug 2016 22:30:06 +0200
parents 064effd222a3
children 4da1a3879100
comparison
equal deleted inserted replaced
9901:c6b969706678 9902:5a667a3a3743
7859 } 7859 }
7860 else 7860 else
7861 { /* ... not currently in a window */ 7861 { /* ... not currently in a window */
7862 char_u *cmd; 7862 char_u *cmd;
7863 7863
7864 if (buf->b_fname == NULL)
7865 {
7866 EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
7867 return;
7868 }
7864 cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25); 7869 cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
7865 if (cmd == NULL) 7870 if (cmd == NULL)
7866 return; 7871 return;
7867 sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname); 7872 sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
7868 do_cmdline_cmd(cmd); 7873 do_cmdline_cmd(cmd);