diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-04-11 23:09:17 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-04-11 23:09:17 +0200 |
| commit | 1b5760f1a142a88b2df82963dc09ed3f60a9461e (patch) | |
| tree | 4f7759fdf44c269499209014bde4f570f944779f /src | |
| parent | dcc054a785771e6c319e8e2a20c866cc174f33bd (diff) | |
delete buffer if needed when creating a scratch buffer
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc index 68f7bdfd..15409b08 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -101,7 +101,10 @@ void edit(const CommandParameters& params, Context& context) if (not buffer) { if (parser.has_option("scratch")) + { + BufferManager::instance().delete_buffer_if_exists(name); buffer = new Buffer(name, Buffer::Flags::None); + } else if (parser.has_option("fifo")) buffer = open_fifo(name, parser.option_value("fifo"), context); else |
