diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-11-03 13:59:05 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-11-03 13:59:05 +0000 |
| commit | e8239feddfcb50a5d7be422fa26d9ca1b398417f (patch) | |
| tree | 7e3bd1837fc906be588ef4d1a6e8a11b3aece563 /src/normal.cc | |
| parent | 4b8c03afe687df52f4617e559f62be0943b7ce93 (diff) | |
Minor cleanup in normal.cc
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/normal.cc b/src/normal.cc index 28a8c322..8be4b792 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -128,11 +128,9 @@ void goto_commands(Context& context, NormalParams params) select<mode, select_to_line_begin<true>>(context, {}); break; case 'j': - { context.push_jump(); select_coord<mode>(buffer, buffer.line_count() - 1, context.selections()); break; - } case 'e': context.push_jump(); select_coord<mode>(buffer, buffer.back_coord(), context.selections()); @@ -177,8 +175,8 @@ void goto_commands(Context& context, NormalParams params) const Selection& sel = context.selections().main(); String filename = content(buffer, sel); static constexpr char forbidden[] = { '\'', '\\', '\0' }; - for (auto c : forbidden) - if (contains(filename, c)) + for (auto c : filename) + if (contains(forbidden, c)) return; auto paths = context.options()["path"].get<Vector<String, MemoryDomain::Options>>(); |
