From 5198c11fc686df7829c44175fd34c4bf4cadb838 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Sun, 1 Feb 2026 11:21:21 +0100 Subject: [PATCH] CMD_OpenScratch --- src/text_editor/commands.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/text_editor/commands.cpp b/src/text_editor/commands.cpp index d2213cb..75980ae 100644 --- a/src/text_editor/commands.cpp +++ b/src/text_editor/commands.cpp @@ -216,6 +216,12 @@ void CMD_OpenLogs() { Open(LogBuffer->name); } RegisterCommand(CMD_OpenLogs, "", "Opens the text editor logs and clear error counter"); +void CMD_OpenScratch() { + ErrorCount = 0; + Buffer *buffer = GetBuffer(NullBufferID); + Open(buffer->name); +} RegisterCommand(CMD_OpenScratch, "", "Opens the scratch buffer"); + void CMD_Errors() { CMD_OpenLogs(); } RegisterCommand(CMD_Errors, "", "Opens the text editor logs and clear error counter");