Minor cleanup in normal.cc
This commit is contained in:
parent
4b8c03afe6
commit
e8239feddf
|
@ -128,11 +128,9 @@ void goto_commands(Context& context, NormalParams params)
|
||||||
select<mode, select_to_line_begin<true>>(context, {});
|
select<mode, select_to_line_begin<true>>(context, {});
|
||||||
break;
|
break;
|
||||||
case 'j':
|
case 'j':
|
||||||
{
|
|
||||||
context.push_jump();
|
context.push_jump();
|
||||||
select_coord<mode>(buffer, buffer.line_count() - 1, context.selections());
|
select_coord<mode>(buffer, buffer.line_count() - 1, context.selections());
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 'e':
|
case 'e':
|
||||||
context.push_jump();
|
context.push_jump();
|
||||||
select_coord<mode>(buffer, buffer.back_coord(), context.selections());
|
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();
|
const Selection& sel = context.selections().main();
|
||||||
String filename = content(buffer, sel);
|
String filename = content(buffer, sel);
|
||||||
static constexpr char forbidden[] = { '\'', '\\', '\0' };
|
static constexpr char forbidden[] = { '\'', '\\', '\0' };
|
||||||
for (auto c : forbidden)
|
for (auto c : filename)
|
||||||
if (contains(filename, c))
|
if (contains(forbidden, c))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto paths = context.options()["path"].get<Vector<String, MemoryDomain::Options>>();
|
auto paths = context.options()["path"].get<Vector<String, MemoryDomain::Options>>();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user