delete buffer if needed when creating a scratch buffer
This commit is contained in:
parent
dcc054a785
commit
1b5760f1a1
|
@ -101,7 +101,10 @@ void edit(const CommandParameters& params, Context& context)
|
||||||
if (not buffer)
|
if (not buffer)
|
||||||
{
|
{
|
||||||
if (parser.has_option("scratch"))
|
if (parser.has_option("scratch"))
|
||||||
|
{
|
||||||
|
BufferManager::instance().delete_buffer_if_exists(name);
|
||||||
buffer = new Buffer(name, Buffer::Flags::None);
|
buffer = new Buffer(name, Buffer::Flags::None);
|
||||||
|
}
|
||||||
else if (parser.has_option("fifo"))
|
else if (parser.has_option("fifo"))
|
||||||
buffer = open_fifo(name, parser.option_value("fifo"), context);
|
buffer = open_fifo(name, parser.option_value("fifo"), context);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user