diff --git a/src/commands.cc b/src/commands.cc index c7247016..7727fe05 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -55,8 +55,9 @@ Buffer* open_fifo(const String& name , const String& filename, Context& context) Buffer* buffer = new Buffer(name, Buffer::Flags::Fifo | Buffer::Flags::NoUndo); auto watcher = new FDWatcher(fd, [buffer](FDWatcher& watcher) { - char data[4096]; - ssize_t count = read(watcher.fd(), data, 4096); + constexpr size_t buffer_size = 1024 * 16; + char data[buffer_size]; + ssize_t count = read(watcher.fd(), data, buffer_size); buffer->insert(buffer->end()-1, count > 0 ? String(data, data+count) : "*** kak: fifo closed ***\n");