diff options
| author | Delapouite <delapouite@gmail.com> | 2018-01-26 12:03:20 +0100 |
|---|---|---|
| committer | Delapouite <delapouite@gmail.com> | 2018-02-27 08:22:46 +0100 |
| commit | 98fcf8a4977d3e19af56acc06388be032823d98e (patch) | |
| tree | 5b739fa5b68d8ac7b36ac14327e3c1e4386c7acf /src | |
| parent | 9bd9fecb53c51733e4addedcc9f635891ec6c2f7 (diff) | |
Add [scratch] indicator in context info
Diffstat (limited to 'src')
| -rw-r--r-- | src/client.cc | 6 |
1 files 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) |
