diff options
author | James McCoy <jamessan@jamessan.com> | 2016-11-15 16:38:33 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-12-28 14:57:39 -0500 |
commit | 486e968bb6bdfb49d17305d6f7747408eda95926 (patch) | |
tree | 5cf2d682be0ae8aed46ac3609449a371c5f5ab09 /src/nvim/ex_cmds.c | |
parent | 4453aa0d29d7a4e488a4c1799c9d33bcbde432eb (diff) | |
download | rneovim-486e968bb6bdfb49d17305d6f7747408eda95926.tar.gz rneovim-486e968bb6bdfb49d17305d6f7747408eda95926.tar.bz2 rneovim-486e968bb6bdfb49d17305d6f7747408eda95926.zip |
vim-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.
https://github.com/vim/vim/commit/bfd096d02087a10e8e2f4bdfb74e0435506fa8bb
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 42af5989a1..a53e8657cb 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5675,6 +5675,10 @@ void ex_sign(exarg_T *eap) } else { // ... not currently in a window + if (buf->b_fname == NULL) { + EMSG(_("E934: Cannot jump to a buffer that does not have a name")); + return; + } char *cmd = xmalloc(STRLEN(buf->b_fname) + 25); sprintf(cmd, "e +%" PRId64 " %s", (int64_t)lnum, buf->b_fname); |