summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-10-16 13:58:56 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-10-17 11:33:09 +0100
commit76fadd81081d7bb762d143dfd2ecca73637328a7 (patch)
tree8619b5d6b599abd7ef7471f5ee224d89eabbd6a1 /src/normal.cc
parentfe704b9b8433145602b1ec63f030ea98b378811d (diff)
More cleanups in the buffer open/reload code
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc5
1 files changed, 1 insertions, 4 deletions
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())
{