From 454258a495fb1b282c9a853058aaa86a210530e0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 4 Mar 2012 19:42:31 +0000 Subject: [PATCH] fix shell_eval when no buffer in context --- src/command_manager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/command_manager.cc b/src/command_manager.cc index 23978246..ac3e1b89 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -136,7 +136,8 @@ static void shell_eval(std::vector& params, dup2(read_pipe[1], 1); dup2(write_pipe[0], 0); - setenv("kak_bufname", context.buffer().name().c_str(), 1); + if (context.has_buffer()) + setenv("kak_bufname", context.buffer().name().c_str(), 1); execlp("sh", "sh", "-c", cmdline.c_str(), NULL); } }