From 17f7607a303f5e7e0b907bda68228f3d1f7b3c45 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 13 Mar 2013 18:51:36 +0100 Subject: [PATCH] write_buffer: consider buffer as saved only if we used it's filename --- src/commands.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index 29e88280..e6008b3d 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -146,7 +146,9 @@ void write_buffer(const CommandParameters& params, Context& context) : parse_filename(params[0]); write_buffer_to_file(buffer, filename); - buffer.notify_saved(); + + if (filename == buffer.name()) + buffer.notify_saved(); } void write_all_buffers(const CommandParameters& params, Context& context)