Skip to content

Commit

Permalink
Make direction flip commands preserve line_editing
Browse files Browse the repository at this point in the history
  • Loading branch information
dpc committed Nov 26, 2018
1 parent 33c3dee commit 4e1e0c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/normal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2077,6 +2077,10 @@ void clear_selections(Context& context, NormalParams)

void flip_selections(Context& context, NormalParams)
{
if (context.is_line_editing()) {
context.enter_or_keep_line_editing();
}

for (auto& sel : context.selections())
{
const BufferCoord tmp = sel.anchor();
Expand All @@ -2088,6 +2092,10 @@ void flip_selections(Context& context, NormalParams)

void ensure_forward(Context& context, NormalParams)
{
if (context.is_line_editing()) {
context.enter_or_keep_line_editing();
}

for (auto& sel : context.selections())
{
const BufferCoord min = sel.min(), max = sel.max();
Expand Down

0 comments on commit 4e1e0c7

Please sign in to comment.