diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-01-20 19:57:17 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-01-20 19:57:17 +0000 |
| commit | 5383cece3ec845be9e41360a404cee8b9c8037ce (patch) | |
| tree | d3051500dc1fd8fc2033876b145ef04a75593b0d /src/debug.cc | |
| parent | b1281d225d5baa73dc0763627d18bb45a4dc97b2 (diff) | |
Fix write_debug with no debug buffer and multiple lines
Diffstat (limited to 'src/debug.cc')
| -rw-r--r-- | src/debug.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/debug.cc b/src/debug.cc index 478feae7..713124ee 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -3,6 +3,7 @@ #include "assert.hh" #include "buffer.hh" #include "buffer_manager.hh" +#include "buffer_utils.hh" #include "string.hh" namespace Kakoune @@ -22,7 +23,7 @@ void write_debug(StringView str) else { String line = str + ((str.empty() or str.back() != '\n') ? "\n" : ""); - new Buffer(debug_buffer_name, Buffer::Flags::NoUndo, { line }); + create_buffer_from_data(line, debug_buffer_name, Buffer::Flags::NoUndo); } } |
