From 76fadd81081d7bb762d143dfd2ecca73637328a7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 16 Oct 2015 13:58:56 +0100 Subject: More cleanups in the buffer open/reload code --- src/normal.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index eb50642e..db878909 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -193,10 +193,7 @@ void goto_commands(Context& context, NormalParams params) Buffer* buffer = BufferManager::instance().get_buffer_ifp(path); if (not buffer) - buffer = create_file_buffer(path); - - if (buffer == nullptr) - throw runtime_error(format("unable to open file '{}'", path)); + buffer = open_file_buffer(path); if (buffer != &context.buffer()) { -- cgit v1.2.3