summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc
index f8a5a74d..90ba937a 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -52,6 +52,9 @@ Buffer* open_fifo(const String& name , const String& filename, Context& context)
fcntl(fd, F_SETFD, FD_CLOEXEC);
if (fd < 0)
throw runtime_error("unable to open " + filename);
+
+ delete BufferManager::instance().get_buffer_ifp(name);
+
Buffer* buffer = new Buffer(name, Buffer::Flags::Fifo | Buffer::Flags::NoUndo);
auto watcher = new FDWatcher(fd, [buffer](FDWatcher& watcher) {