From 51ec633718b5d31853110fd08e971eafa6ecb603 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 5 Jun 2024 19:49:35 +1000 Subject: Echo an information message about *scratch* buffer and leave it empty Having to manually clear the scratch was never really nice and hopefully this will be less annoying and as helpful to newcomers. --- src/buffer_manager.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/buffer_manager.cc') diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc index 35f0fcde..8d2820b2 100644 --- a/src/buffer_manager.cc +++ b/src/buffer_manager.cc @@ -101,9 +101,7 @@ Buffer& BufferManager::get_buffer_matching(const Regex& regex) Buffer& BufferManager::get_first_buffer() { if (all_of(m_buffers, [](auto& b) { return (b->flags() & Buffer::Flags::Debug); })) - create_buffer("*scratch*", Buffer::Flags::None, - {StringData::create("*** this is a *scratch* buffer which won't be automatically saved ***\n"), - StringData::create("*** use it for notes or open a file buffer with the :edit command ***\n")}, + create_buffer("*scratch*", Buffer::Flags::None, {StringData::create("\n")}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}}); return *m_buffers.back(); -- cgit v1.2.3