From 068ca08b4ca193a2daa10c2232d71c06225602dd Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 2 Mar 2016 13:14:21 +0000 Subject: [PATCH] Use the general code path for reload info box handling in Client --- src/client.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/client.cc b/src/client.cc index eb099b6f..c2eb5cc5 100644 --- a/src/client.cc +++ b/src/client.cc @@ -276,12 +276,11 @@ void Client::check_if_buffer_needs_reloading() return; if (reload == Autoreload::Ask) { - m_ui->info_show( - format("reload '{}' ?", buffer.display_name()), - format("'{}' was modified externally\n" - "press or y to reload, or n to keep", - buffer.display_name()), - CharCoord{}, get_face("Information"), InfoStyle::Prompt); + StringView bufname = buffer.display_name(); + info_show(format("reload '{}' ?", bufname), + format("'{}' was modified externally\n" + "press or y to reload, or n to keep", + bufname), {}, InfoStyle::Prompt); m_buffer_reload_dialog_opened = true; m_input_handler.on_next_key(KeymapMode::None, [this](Key key, Context&){ on_buffer_reload_key(key); });