diff --git a/src/debug.cc b/src/debug.cc index 84f52581..e3f73aeb 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -23,8 +23,9 @@ void write_debug(const String& str) { Buffer& debug_buffer = get_or_create_debug_buffer(); Editor editor(debug_buffer); - editor.select(debug_buffer.end()); + editor.select(debug_buffer.end()-1); editor.insert(str); + debug_buffer.reset_undo_data(); } }