From 98fcf8a4977d3e19af56acc06388be032823d98e Mon Sep 17 00:00:00 2001 From: Delapouite Date: Fri, 26 Jan 2018 12:03:20 +0100 Subject: [PATCH] Add [scratch] indicator in context info --- src/client.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client.cc b/src/client.cc index 5b6e2866..28fe97ae 100644 --- a/src/client.cc +++ b/src/client.cc @@ -130,10 +130,12 @@ String generate_context_info(const Context& context) s += "[+]"; if (context.client().input_handler().is_recording()) s += format("[recording ({})]", context.client().input_handler().recording_reg()); - if (context.buffer().flags() & Buffer::Flags::New) - s += "[new file]"; if (context.hooks_disabled()) s += "[no-hooks]"; + if (not(context.buffer().flags() & (Buffer::Flags::File | Buffer::Flags::Debug))) + s += "[scratch]"; + if (context.buffer().flags() & Buffer::Flags::New) + s += "[new file]"; if (context.buffer().flags() & Buffer::Flags::Fifo) s += "[fifo]"; if (context.buffer().flags() & Buffer::Flags::Debug)