parent
f592768d3a
commit
4a96926c4b
|
@ -274,10 +274,19 @@ void Client::force_redraw()
|
||||||
void Client::reload_buffer()
|
void Client::reload_buffer()
|
||||||
{
|
{
|
||||||
Buffer& buffer = context().buffer();
|
Buffer& buffer = context().buffer();
|
||||||
|
try
|
||||||
|
{
|
||||||
reload_file_buffer(buffer);
|
reload_file_buffer(buffer);
|
||||||
context().print_status({ format("'{}' reloaded", buffer.display_name()),
|
context().print_status({ format("'{}' reloaded", buffer.display_name()),
|
||||||
get_face("Information") });
|
get_face("Information") });
|
||||||
}
|
}
|
||||||
|
catch (runtime_error& error)
|
||||||
|
{
|
||||||
|
context().print_status({ format("error while reloading buffer: '{}'", error.what()),
|
||||||
|
get_face("Error") });
|
||||||
|
buffer.set_fs_timestamp(get_fs_timestamp(buffer.name()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Client::on_buffer_reload_key(Key key)
|
void Client::on_buffer_reload_key(Key key)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user