Implement dt*,dT*,df*,dF*
This commit is contained in:
parent
f091ee6590
commit
0fcc3d3c68
@ -500,6 +500,36 @@ std::shared_ptr<Buffer::Range> BufferPane::get_range_for_motion(const Command::U
|
||||
|
||||
switch (motion.id)
|
||||
{
|
||||
case Command::Motion::FORWARD_UP_TO_CHAR:
|
||||
if (!end->go_forward_in_line_up_to_char(motion.following_char))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
end->go_forward();
|
||||
break;
|
||||
|
||||
case Command::Motion::FORWARD_ON_TO_CHAR:
|
||||
if (!end->go_forward_in_line_on_to_char(motion.following_char))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
end->go_forward();
|
||||
break;
|
||||
|
||||
case Command::Motion::BACK_UP_TO_CHAR:
|
||||
if (!start->go_backward_in_line_up_to_char(motion.following_char))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
break;
|
||||
|
||||
case Command::Motion::BACK_ON_TO_CHAR:
|
||||
if (!start->go_backward_in_line_on_to_char(motion.following_char))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
break;
|
||||
|
||||
case Command::Motion::THIS_LINE:
|
||||
start->go_start_of_line();
|
||||
end->go_end_of_line(true);
|
||||
|
@ -336,6 +336,7 @@ void Window::execute_command(const Command & command)
|
||||
m_focused_buffer_pane->cursor_move(BufferPane::CursorMovement::BACK_ON_TO_CHAR, command.main.following_char);
|
||||
break;
|
||||
case Command::DELETE_MOTION:
|
||||
m_focused_buffer_pane->delete_motion(command.motion);
|
||||
break;
|
||||
case Command::DELETE_LINE:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user